aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2012-09-06 14:11:27 -0400
committerFelipe Balbi <balbi@ti.com>2012-09-10 09:13:03 -0400
commit721e2e91945bc2520d57d795dfe1b502ecec567c (patch)
tree367b0e0de9fabd165fdae6887902c3ae72a81bef /drivers/usb/gadget/composite.c
parentcc2683c318a5bf192b75cd5c343b51009db0cf6c (diff)
usb: gadget: libcomposite: move composite.c into libcomposite
This moves composite.c into libcomposite and updates all gadgets. Finally! Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index c7066cd4c95a..27ac36638827 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -154,6 +154,7 @@ ep_found:
154 } 154 }
155 return 0; 155 return 0;
156} 156}
157EXPORT_SYMBOL_GPL(config_ep_by_speed);
157 158
158/** 159/**
159 * usb_add_function() - add a function to a configuration 160 * usb_add_function() - add a function to a configuration
@@ -212,6 +213,7 @@ done:
212 function->name, function, value); 213 function->name, function, value);
213 return value; 214 return value;
214} 215}
216EXPORT_SYMBOL_GPL(usb_add_function);
215 217
216/** 218/**
217 * usb_function_deactivate - prevent function and gadget enumeration 219 * usb_function_deactivate - prevent function and gadget enumeration
@@ -248,6 +250,7 @@ int usb_function_deactivate(struct usb_function *function)
248 spin_unlock_irqrestore(&cdev->lock, flags); 250 spin_unlock_irqrestore(&cdev->lock, flags);
249 return status; 251 return status;
250} 252}
253EXPORT_SYMBOL_GPL(usb_function_deactivate);
251 254
252/** 255/**
253 * usb_function_activate - allow function and gadget enumeration 256 * usb_function_activate - allow function and gadget enumeration
@@ -278,6 +281,7 @@ int usb_function_activate(struct usb_function *function)
278 spin_unlock_irqrestore(&cdev->lock, flags); 281 spin_unlock_irqrestore(&cdev->lock, flags);
279 return status; 282 return status;
280} 283}
284EXPORT_SYMBOL_GPL(usb_function_activate);
281 285
282/** 286/**
283 * usb_interface_id() - allocate an unused interface ID 287 * usb_interface_id() - allocate an unused interface ID
@@ -314,6 +318,7 @@ int usb_interface_id(struct usb_configuration *config,
314 } 318 }
315 return -ENODEV; 319 return -ENODEV;
316} 320}
321EXPORT_SYMBOL_GPL(usb_interface_id);
317 322
318static int config_buf(struct usb_configuration *config, 323static int config_buf(struct usb_configuration *config,
319 enum usb_device_speed speed, void *buf, u8 type) 324 enum usb_device_speed speed, void *buf, u8 type)
@@ -754,6 +759,7 @@ done:
754 config->bConfigurationValue, status); 759 config->bConfigurationValue, status);
755 return status; 760 return status;
756} 761}
762EXPORT_SYMBOL_GPL(usb_add_config);
757 763
758static void remove_config(struct usb_composite_dev *cdev, 764static void remove_config(struct usb_composite_dev *cdev,
759 struct usb_configuration *config) 765 struct usb_configuration *config)
@@ -947,6 +953,7 @@ int usb_string_id(struct usb_composite_dev *cdev)
947 } 953 }
948 return -ENODEV; 954 return -ENODEV;
949} 955}
956EXPORT_SYMBOL_GPL(usb_string_id);
950 957
951/** 958/**
952 * usb_string_ids() - allocate unused string IDs in batch 959 * usb_string_ids() - allocate unused string IDs in batch
@@ -978,6 +985,7 @@ int usb_string_ids_tab(struct usb_composite_dev *cdev, struct usb_string *str)
978 985
979 return 0; 986 return 0;
980} 987}
988EXPORT_SYMBOL_GPL(usb_string_ids_tab);
981 989
982/** 990/**
983 * usb_string_ids_n() - allocate unused string IDs in batch 991 * usb_string_ids_n() - allocate unused string IDs in batch
@@ -1006,7 +1014,7 @@ int usb_string_ids_n(struct usb_composite_dev *c, unsigned n)
1006 c->next_string_id += n; 1014 c->next_string_id += n;
1007 return next + 1; 1015 return next + 1;
1008} 1016}
1009 1017EXPORT_SYMBOL_GPL(usb_string_ids_n);
1010 1018
1011/*-------------------------------------------------------------------------*/ 1019/*-------------------------------------------------------------------------*/
1012 1020
@@ -1572,6 +1580,7 @@ int usb_composite_probe(struct usb_composite_driver *driver)
1572 1580
1573 return usb_gadget_probe_driver(gadget_driver); 1581 return usb_gadget_probe_driver(gadget_driver);
1574} 1582}
1583EXPORT_SYMBOL_GPL(usb_composite_probe);
1575 1584
1576/** 1585/**
1577 * usb_composite_unregister() - unregister a composite driver 1586 * usb_composite_unregister() - unregister a composite driver
@@ -1584,6 +1593,7 @@ void usb_composite_unregister(struct usb_composite_driver *driver)
1584{ 1593{
1585 usb_gadget_unregister_driver(&driver->gadget_driver); 1594 usb_gadget_unregister_driver(&driver->gadget_driver);
1586} 1595}
1596EXPORT_SYMBOL_GPL(usb_composite_unregister);
1587 1597
1588/** 1598/**
1589 * usb_composite_setup_continue() - Continue with the control transfer 1599 * usb_composite_setup_continue() - Continue with the control transfer
@@ -1620,6 +1630,7 @@ void usb_composite_setup_continue(struct usb_composite_dev *cdev)
1620 1630
1621 spin_unlock_irqrestore(&cdev->lock, flags); 1631 spin_unlock_irqrestore(&cdev->lock, flags);
1622} 1632}
1633EXPORT_SYMBOL_GPL(usb_composite_setup_continue);
1623 1634
1624static char *composite_default_mfr(struct usb_gadget *gadget) 1635static char *composite_default_mfr(struct usb_gadget *gadget)
1625{ 1636{
@@ -1672,3 +1683,4 @@ void usb_composite_overwrite_options(struct usb_composite_dev *cdev,
1672 dev_str[USB_GADGET_PRODUCT_IDX].s = covr->product; 1683 dev_str[USB_GADGET_PRODUCT_IDX].s = covr->product;
1673 } 1684 }
1674} 1685}
1686EXPORT_SYMBOL_GPL(usb_composite_overwrite_options);