summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2018-03-02 21:44:11 +0100
committerKrzysztof Opasiak <k.opasiak@samsung.com>2018-03-02 21:46:48 +0100
commit0e27eda52805925c75bff7846e4a9f033990c855 (patch)
tree37236b9dca48b788d8ba5509d86bfe2da56ba6f3
parent5040220f793aa280bc994bf6ba164e0d2c2b5077 (diff)
downloadlibdevice-node-0e27eda52805925c75bff7846e4a9f033990c855.tar.gz
libdevice-node-0e27eda52805925c75bff7846e4a9f033990c855.tar.bz2
libdevice-node-0e27eda52805925c75bff7846e4a9f033990c855.zip
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 <k.opasiak@samsung.com>
-rw-r--r--hw/usb_gadget.h8
1 files changed, 4 insertions, 4 deletions
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