usb: fix bitwise operation error 78/97378/2
authortaeyoung <ty317.kim@samsung.com>
Mon, 14 Nov 2016 04:57:38 +0000 (13:57 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Mon, 14 Nov 2016 05:28:21 +0000 (21:28 -0800)
- The routine is for checking MTP is enabled.
  Thus '|' needs to be changed to '&'.

Change-Id: I9e41e95cc26cda47b41872d0fe148452555ff034
Signed-off-by: taeyoung <ty317.kim@samsung.com>
src/usb/usb-state.c

index 29f7688..229cb7e 100644 (file)
@@ -188,7 +188,7 @@ void usb_state_update_state(usb_connection_state_e state, unsigned int mode)
                        remove_notification("MediaDeviceNotiOff", noti_id);
                        noti_id = -1;
                }
-       } else if (mode | USB_FUNCTION_MTP) {
+       } else if (mode & USB_FUNCTION_MTP) {
                if (noti_id < 0)
                        noti_id = add_notification("MediaDeviceNotiOn");
                if (noti_id < 0)