From: Krzysztof Opasiak Date: Fri, 2 Mar 2018 20:44:11 +0000 (+0100) Subject: usb: Add service names to suitable USB functions X-Git-Tag: submit/tizen/20180314.000517~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e27eda52805925c75bff7846e4a9f033990c855;p=platform%2Fcore%2Fsystem%2Flibdevice-node.git usb: Add service names to suitable USB functions Both MTP and SDB functions requires userspace service to work. So let's add names of those services to function structure. Change-Id: I544fb4251751c8c98f11197af2898cf5c1a53d33 Signed-off-by: Krzysztof Opasiak --- diff --git a/hw/usb_gadget.h b/hw/usb_gadget.h index 2db9566..fb8288e 100644 --- a/hw/usb_gadget.h +++ b/hw/usb_gadget.h @@ -247,7 +247,7 @@ out: return -ENOMEM; } -#define DEFINE_USB_FUNCTION_WITH_SERVICE(_id, _name) \ +#define DEFINE_USB_FUNCTION_WITH_SERVICE(_id, _name, _service) \ static struct usb_function_with_service _##_name##_function = { \ .func = { \ .function_group = USB_FUNCTION_GROUP_WITH_SERVICE, \ @@ -257,11 +257,11 @@ out: .free_func = free_func_with_service, \ .clone = clone_func_with_service, \ }, \ - .service = NULL, \ + .service = _service, \ } -DEFINE_USB_FUNCTION_WITH_SERVICE(USB_FUNCTION_SDB, sdb); -DEFINE_USB_FUNCTION_WITH_SERVICE(USB_FUNCTION_MTP, mtp); +DEFINE_USB_FUNCTION_WITH_SERVICE(USB_FUNCTION_SDB, sdb, "sdbd"); +DEFINE_USB_FUNCTION_WITH_SERVICE(USB_FUNCTION_MTP, mtp, "mtp-responder"); #define MAKE_FUNC_AVAILABLE(_name, _vname) \ [FUNC_IDX_FROM_MASK(USB_FUNCTION_##_name)] = &_##_vname##_function