aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/composite.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index a78e813d27e4..e28b6626802c 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -248,11 +248,7 @@ int usb_add_config(struct usb_composite_dev *,
248 * and language IDs provided in control requests 248 * and language IDs provided in control requests
249 * @needs_serial: set to 1 if the gadget needs userspace to provide 249 * @needs_serial: set to 1 if the gadget needs userspace to provide
250 * a serial number. If one is not provided, warning will be printed. 250 * a serial number. If one is not provided, warning will be printed.
251 * @bind: (REQUIRED) Used to allocate resources that are shared across the 251 * @unbind: Reverses bind; called as a side effect of unregistering
252 * whole device, such as string IDs, and add its configurations using
253 * @usb_add_config(). This may fail by returning a negative errno
254 * value; it should return zero on successful initialization.
255 * @unbind: Reverses @bind(); called as a side effect of unregistering
256 * this driver. 252 * this driver.
257 * @disconnect: optional driver disconnect method 253 * @disconnect: optional driver disconnect method
258 * @suspend: Notifies when the host stops sending USB traffic, 254 * @suspend: Notifies when the host stops sending USB traffic,
@@ -263,7 +259,7 @@ int usb_add_config(struct usb_composite_dev *,
263 * Devices default to reporting self powered operation. Devices which rely 259 * Devices default to reporting self powered operation. Devices which rely
264 * on bus powered operation should report this in their @bind() method. 260 * on bus powered operation should report this in their @bind() method.
265 * 261 *
266 * Before returning from @bind, various fields in the template descriptor 262 * Before returning from bind, various fields in the template descriptor
267 * may be overridden. These include the idVendor/idProduct/bcdDevice values 263 * may be overridden. These include the idVendor/idProduct/bcdDevice values
268 * normally to bind the appropriate host side driver, and the three strings 264 * normally to bind the appropriate host side driver, and the three strings
269 * (iManufacturer, iProduct, iSerialNumber) normally used to provide user 265 * (iManufacturer, iProduct, iSerialNumber) normally used to provide user
@@ -279,12 +275,6 @@ struct usb_composite_driver {
279 struct usb_gadget_strings **strings; 275 struct usb_gadget_strings **strings;
280 unsigned needs_serial:1; 276 unsigned needs_serial:1;
281 277
282 /* REVISIT: bind() functions can be marked __init, which
283 * makes trouble for section mismatch analysis. See if
284 * we can't restructure things to avoid mismatching...
285 */
286
287 int (*bind)(struct usb_composite_dev *);
288 int (*unbind)(struct usb_composite_dev *); 278 int (*unbind)(struct usb_composite_dev *);
289 279
290 void (*disconnect)(struct usb_composite_dev *); 280 void (*disconnect)(struct usb_composite_dev *);
@@ -294,8 +284,9 @@ struct usb_composite_driver {
294 void (*resume)(struct usb_composite_dev *); 284 void (*resume)(struct usb_composite_dev *);
295}; 285};
296 286
297extern int usb_composite_register(struct usb_composite_driver *); 287extern int usb_composite_probe(struct usb_composite_driver *driver,
298extern void usb_composite_unregister(struct usb_composite_driver *); 288 int (*bind)(struct usb_composite_dev *cdev));
289extern void usb_composite_unregister(struct usb_composite_driver *driver);
299 290
300 291
301/** 292/**