diff options
author | Youngjae Cho <y0.cho@samsung.com> | 2022-05-03 09:38:40 +0900 |
---|---|---|
committer | Youngjae Cho <y0.cho@samsung.com> | 2022-05-03 09:39:16 +0900 |
commit | 7ed0bfea10cb5429eae4052612deb8f8078fe9c9 (patch) | |
tree | 407e6fbfb465ccc5863c0bab39bdba1825894711 | |
parent | 119dee6d9a6c876ee00ebc70ff867b4c14a85053 (diff) | |
download | data-router-accepted/tizen_unified.tar.gz data-router-accepted/tizen_unified.tar.bz2 data-router-accepted/tizen_unified.zip |
usb: apply new enums for usb-gadget modeHEADtizen_9.0_m2_releasetizen_8.0_m2_releasetizen_7.0_m2_releasesubmit/tizen/20220503.013451accepted/tizen/unified/20220505.134709accepted/tizen/9.0/unified/20241030.233736accepted/tizen/8.0/unified/20231005.093210accepted/tizen/7.0/unified/hotfix/20221116.105150accepted/tizen/7.0/unified/20221110.061724tizen_9.0tizen_8.0tizen_7.0_hotfixtizen_7.0tizenaccepted/tizen_unifiedaccepted/tizen_9.0_unifiedaccepted/tizen_8.0_unifiedaccepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unified
Change-Id: I2b5328d2c51f3002820f7de8e40ed801eabb4852
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rwxr-xr-x | packaging/data-router.spec | 1 | ||||
-rwxr-xr-x | src/dr-noti-handler.c | 10 |
3 files changed, 4 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a66e76..289aa9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED glib-2.0 gio-2.0 dlog vconf + capi-system-device ) FOREACH(flag ${pkgs_CFLAGS}) diff --git a/packaging/data-router.spec b/packaging/data-router.spec index a14cacf..9222901 100755 --- a/packaging/data-router.spec +++ b/packaging/data-router.spec @@ -11,6 +11,7 @@ BuildRequires: pkgconfig(glib-2.0) >= 2.26 BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(capi-system-device) Requires(post): /usr/bin/vconftool %description diff --git a/src/dr-noti-handler.c b/src/dr-noti-handler.c index a99e05d..b47f762 100755 --- a/src/dr-noti-handler.c +++ b/src/dr-noti-handler.c @@ -23,6 +23,7 @@ #include <glib.h> #include <sys/wait.h> +#include <device/usb-gadget.h> #include "dr-main.h" #include "dr-usb.h" @@ -38,14 +39,7 @@ volatile gboolean dsr_status = FALSE; static gboolean acm_enabled(int mode) { - switch (mode) { - case SET_USB_DEFAULT: - case SET_USB_SDB: - case SET_USB_SDB_DIAG: - return TRUE; - default: - return FALSE; - } + return (mode & USB_GADGET_FUNC_ACM); } static void __usb_status_noti_handler(void *data) |