diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-25 12:12:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 17:35:07 -0500 |
commit | 782e70c6fc2290a0395850e8e02583b8b62264d8 (patch) | |
tree | 455cb28ce894ba26d18011129c6bbdf59ed2879b /drivers/usb | |
parent | 667d691ed7a70c9a9fde5b6bd663a5f38326e026 (diff) |
USB: mark USB drivers as being GPL only
Over two years ago, the Linux USB developers stated that they believed
there was no way to create a USB kernel driver that was not under the
GPL. This patch moves the USB apis to enforce that decision.
There are no known closed source USB drivers in the wild, so this patch
should cause no problems.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/driver.c | 10 | ||||
-rw-r--r-- | drivers/usb/core/file.c | 4 | ||||
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 10 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 18 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 5 | ||||
-rw-r--r-- | drivers/usb/core/message.c | 32 | ||||
-rw-r--r-- | drivers/usb/core/urb.c | 15 | ||||
-rw-r--r-- | drivers/usb/core/usb.c | 62 |
8 files changed, 61 insertions, 95 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 96d3f852f4ad..7e7f2c42494c 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -325,7 +325,7 @@ int usb_driver_claim_interface(struct usb_driver *driver, | |||
325 | 325 | ||
326 | return retval; | 326 | return retval; |
327 | } | 327 | } |
328 | EXPORT_SYMBOL(usb_driver_claim_interface); | 328 | EXPORT_SYMBOL_GPL(usb_driver_claim_interface); |
329 | 329 | ||
330 | /** | 330 | /** |
331 | * usb_driver_release_interface - unbind a driver from an interface | 331 | * usb_driver_release_interface - unbind a driver from an interface |
@@ -370,7 +370,7 @@ void usb_driver_release_interface(struct usb_driver *driver, | |||
370 | iface->needs_remote_wakeup = 0; | 370 | iface->needs_remote_wakeup = 0; |
371 | usb_pm_unlock(udev); | 371 | usb_pm_unlock(udev); |
372 | } | 372 | } |
373 | EXPORT_SYMBOL(usb_driver_release_interface); | 373 | EXPORT_SYMBOL_GPL(usb_driver_release_interface); |
374 | 374 | ||
375 | /* returns 0 if no match, 1 if match */ | 375 | /* returns 0 if no match, 1 if match */ |
376 | int usb_match_device(struct usb_device *dev, const struct usb_device_id *id) | 376 | int usb_match_device(struct usb_device *dev, const struct usb_device_id *id) |
@@ -542,7 +542,7 @@ const struct usb_device_id *usb_match_id(struct usb_interface *interface, | |||
542 | 542 | ||
543 | return NULL; | 543 | return NULL; |
544 | } | 544 | } |
545 | EXPORT_SYMBOL_GPL_FUTURE(usb_match_id); | 545 | EXPORT_SYMBOL_GPL(usb_match_id); |
546 | 546 | ||
547 | static int usb_device_match(struct device *dev, struct device_driver *drv) | 547 | static int usb_device_match(struct device *dev, struct device_driver *drv) |
548 | { | 548 | { |
@@ -745,7 +745,7 @@ int usb_register_driver(struct usb_driver *new_driver, struct module *owner, | |||
745 | 745 | ||
746 | return retval; | 746 | return retval; |
747 | } | 747 | } |
748 | EXPORT_SYMBOL_GPL_FUTURE(usb_register_driver); | 748 | EXPORT_SYMBOL_GPL(usb_register_driver); |
749 | 749 | ||
750 | /** | 750 | /** |
751 | * usb_deregister - unregister a USB interface driver | 751 | * usb_deregister - unregister a USB interface driver |
@@ -769,7 +769,7 @@ void usb_deregister(struct usb_driver *driver) | |||
769 | 769 | ||
770 | usbfs_update_special(); | 770 | usbfs_update_special(); |
771 | } | 771 | } |
772 | EXPORT_SYMBOL_GPL_FUTURE(usb_deregister); | 772 | EXPORT_SYMBOL_GPL(usb_deregister); |
773 | 773 | ||
774 | #ifdef CONFIG_PM | 774 | #ifdef CONFIG_PM |
775 | 775 | ||
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index 5d860bc9b421..8133c99c6c5c 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c | |||
@@ -204,7 +204,7 @@ int usb_register_dev(struct usb_interface *intf, | |||
204 | exit: | 204 | exit: |
205 | return retval; | 205 | return retval; |
206 | } | 206 | } |
207 | EXPORT_SYMBOL(usb_register_dev); | 207 | EXPORT_SYMBOL_GPL(usb_register_dev); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | * usb_deregister_dev - deregister a USB device's dynamic minor. | 210 | * usb_deregister_dev - deregister a USB device's dynamic minor. |
@@ -245,4 +245,4 @@ void usb_deregister_dev(struct usb_interface *intf, | |||
245 | intf->minor = -1; | 245 | intf->minor = -1; |
246 | destroy_usb_class(); | 246 | destroy_usb_class(); |
247 | } | 247 | } |
248 | EXPORT_SYMBOL(usb_deregister_dev); | 248 | EXPORT_SYMBOL_GPL(usb_deregister_dev); |
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 424674203fd3..851d5e1625d9 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -144,7 +144,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) | |||
144 | dev_err (&dev->dev, "init %s fail, %d\n", pci_name(dev), retval); | 144 | dev_err (&dev->dev, "init %s fail, %d\n", pci_name(dev), retval); |
145 | return retval; | 145 | return retval; |
146 | } | 146 | } |
147 | EXPORT_SYMBOL (usb_hcd_pci_probe); | 147 | EXPORT_SYMBOL_GPL(usb_hcd_pci_probe); |
148 | 148 | ||
149 | 149 | ||
150 | /* may be called without controller electrically present */ | 150 | /* may be called without controller electrically present */ |
@@ -179,7 +179,7 @@ void usb_hcd_pci_remove (struct pci_dev *dev) | |||
179 | usb_put_hcd (hcd); | 179 | usb_put_hcd (hcd); |
180 | pci_disable_device(dev); | 180 | pci_disable_device(dev); |
181 | } | 181 | } |
182 | EXPORT_SYMBOL (usb_hcd_pci_remove); | 182 | EXPORT_SYMBOL_GPL(usb_hcd_pci_remove); |
183 | 183 | ||
184 | 184 | ||
185 | #ifdef CONFIG_PM | 185 | #ifdef CONFIG_PM |
@@ -314,7 +314,7 @@ done: | |||
314 | 314 | ||
315 | return retval; | 315 | return retval; |
316 | } | 316 | } |
317 | EXPORT_SYMBOL (usb_hcd_pci_suspend); | 317 | EXPORT_SYMBOL_GPL(usb_hcd_pci_suspend); |
318 | 318 | ||
319 | /** | 319 | /** |
320 | * usb_hcd_pci_resume - power management resume of a PCI-based HCD | 320 | * usb_hcd_pci_resume - power management resume of a PCI-based HCD |
@@ -416,7 +416,7 @@ int usb_hcd_pci_resume (struct pci_dev *dev) | |||
416 | 416 | ||
417 | return retval; | 417 | return retval; |
418 | } | 418 | } |
419 | EXPORT_SYMBOL (usb_hcd_pci_resume); | 419 | EXPORT_SYMBOL_GPL(usb_hcd_pci_resume); |
420 | 420 | ||
421 | #endif /* CONFIG_PM */ | 421 | #endif /* CONFIG_PM */ |
422 | 422 | ||
@@ -435,5 +435,5 @@ void usb_hcd_pci_shutdown (struct pci_dev *dev) | |||
435 | if (hcd->driver->shutdown) | 435 | if (hcd->driver->shutdown) |
436 | hcd->driver->shutdown(hcd); | 436 | hcd->driver->shutdown(hcd); |
437 | } | 437 | } |
438 | EXPORT_SYMBOL (usb_hcd_pci_shutdown); | 438 | EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown); |
439 | 439 | ||
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index a1906908d3b1..e52ed1663b3c 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -971,7 +971,7 @@ long usb_calc_bus_time (int speed, int is_input, int isoc, int bytecount) | |||
971 | return -1; | 971 | return -1; |
972 | } | 972 | } |
973 | } | 973 | } |
974 | EXPORT_SYMBOL (usb_calc_bus_time); | 974 | EXPORT_SYMBOL_GPL(usb_calc_bus_time); |
975 | 975 | ||
976 | 976 | ||
977 | /*-------------------------------------------------------------------------*/ | 977 | /*-------------------------------------------------------------------------*/ |
@@ -1427,7 +1427,7 @@ void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, int status) | |||
1427 | wake_up (&usb_kill_urb_queue); | 1427 | wake_up (&usb_kill_urb_queue); |
1428 | usb_put_urb (urb); | 1428 | usb_put_urb (urb); |
1429 | } | 1429 | } |
1430 | EXPORT_SYMBOL (usb_hcd_giveback_urb); | 1430 | EXPORT_SYMBOL_GPL(usb_hcd_giveback_urb); |
1431 | 1431 | ||
1432 | /*-------------------------------------------------------------------------*/ | 1432 | /*-------------------------------------------------------------------------*/ |
1433 | 1433 | ||
@@ -1667,7 +1667,7 @@ int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num) | |||
1667 | mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(10)); | 1667 | mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(10)); |
1668 | return status; | 1668 | return status; |
1669 | } | 1669 | } |
1670 | EXPORT_SYMBOL (usb_bus_start_enum); | 1670 | EXPORT_SYMBOL_GPL(usb_bus_start_enum); |
1671 | 1671 | ||
1672 | #endif | 1672 | #endif |
1673 | 1673 | ||
@@ -1774,7 +1774,7 @@ struct usb_hcd *usb_create_hcd (const struct hc_driver *driver, | |||
1774 | "USB Host Controller"; | 1774 | "USB Host Controller"; |
1775 | return hcd; | 1775 | return hcd; |
1776 | } | 1776 | } |
1777 | EXPORT_SYMBOL (usb_create_hcd); | 1777 | EXPORT_SYMBOL_GPL(usb_create_hcd); |
1778 | 1778 | ||
1779 | static void hcd_release (struct kref *kref) | 1779 | static void hcd_release (struct kref *kref) |
1780 | { | 1780 | { |
@@ -1789,14 +1789,14 @@ struct usb_hcd *usb_get_hcd (struct usb_hcd *hcd) | |||
1789 | kref_get (&hcd->kref); | 1789 | kref_get (&hcd->kref); |
1790 | return hcd; | 1790 | return hcd; |
1791 | } | 1791 | } |
1792 | EXPORT_SYMBOL (usb_get_hcd); | 1792 | EXPORT_SYMBOL_GPL(usb_get_hcd); |
1793 | 1793 | ||
1794 | void usb_put_hcd (struct usb_hcd *hcd) | 1794 | void usb_put_hcd (struct usb_hcd *hcd) |
1795 | { | 1795 | { |
1796 | if (hcd) | 1796 | if (hcd) |
1797 | kref_put (&hcd->kref, hcd_release); | 1797 | kref_put (&hcd->kref, hcd_release); |
1798 | } | 1798 | } |
1799 | EXPORT_SYMBOL (usb_put_hcd); | 1799 | EXPORT_SYMBOL_GPL(usb_put_hcd); |
1800 | 1800 | ||
1801 | /** | 1801 | /** |
1802 | * usb_add_hcd - finish generic HCD structure initialization and register | 1802 | * usb_add_hcd - finish generic HCD structure initialization and register |
@@ -1922,7 +1922,7 @@ err_register_bus: | |||
1922 | hcd_buffer_destroy(hcd); | 1922 | hcd_buffer_destroy(hcd); |
1923 | return retval; | 1923 | return retval; |
1924 | } | 1924 | } |
1925 | EXPORT_SYMBOL (usb_add_hcd); | 1925 | EXPORT_SYMBOL_GPL(usb_add_hcd); |
1926 | 1926 | ||
1927 | /** | 1927 | /** |
1928 | * usb_remove_hcd - shutdown processing for generic HCDs | 1928 | * usb_remove_hcd - shutdown processing for generic HCDs |
@@ -1964,7 +1964,7 @@ void usb_remove_hcd(struct usb_hcd *hcd) | |||
1964 | usb_deregister_bus(&hcd->self); | 1964 | usb_deregister_bus(&hcd->self); |
1965 | hcd_buffer_destroy(hcd); | 1965 | hcd_buffer_destroy(hcd); |
1966 | } | 1966 | } |
1967 | EXPORT_SYMBOL (usb_remove_hcd); | 1967 | EXPORT_SYMBOL_GPL(usb_remove_hcd); |
1968 | 1968 | ||
1969 | void | 1969 | void |
1970 | usb_hcd_platform_shutdown(struct platform_device* dev) | 1970 | usb_hcd_platform_shutdown(struct platform_device* dev) |
@@ -1974,7 +1974,7 @@ usb_hcd_platform_shutdown(struct platform_device* dev) | |||
1974 | if (hcd->driver->shutdown) | 1974 | if (hcd->driver->shutdown) |
1975 | hcd->driver->shutdown(hcd); | 1975 | hcd->driver->shutdown(hcd); |
1976 | } | 1976 | } |
1977 | EXPORT_SYMBOL (usb_hcd_platform_shutdown); | 1977 | EXPORT_SYMBOL_GPL(usb_hcd_platform_shutdown); |
1978 | 1978 | ||
1979 | /*-------------------------------------------------------------------------*/ | 1979 | /*-------------------------------------------------------------------------*/ |
1980 | 1980 | ||
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 53fe049b40f5..68fc5219ca15 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -494,6 +494,7 @@ void usb_hub_tt_clear_buffer (struct usb_device *udev, int pipe) | |||
494 | schedule_work (&tt->kevent); | 494 | schedule_work (&tt->kevent); |
495 | spin_unlock_irqrestore (&tt->lock, flags); | 495 | spin_unlock_irqrestore (&tt->lock, flags); |
496 | } | 496 | } |
497 | EXPORT_SYMBOL_GPL(usb_hub_tt_clear_buffer); | ||
497 | 498 | ||
498 | static void hub_power_on(struct usb_hub *hub) | 499 | static void hub_power_on(struct usb_hub *hub) |
499 | { | 500 | { |
@@ -3116,7 +3117,7 @@ re_enumerate: | |||
3116 | hub_port_logical_disconnect(parent_hub, port1); | 3117 | hub_port_logical_disconnect(parent_hub, port1); |
3117 | return -ENODEV; | 3118 | return -ENODEV; |
3118 | } | 3119 | } |
3119 | EXPORT_SYMBOL(usb_reset_device); | 3120 | EXPORT_SYMBOL_GPL(usb_reset_device); |
3120 | 3121 | ||
3121 | /** | 3122 | /** |
3122 | * usb_reset_composite_device - warn interface drivers and perform a USB port reset | 3123 | * usb_reset_composite_device - warn interface drivers and perform a USB port reset |
@@ -3187,4 +3188,4 @@ int usb_reset_composite_device(struct usb_device *udev, | |||
3187 | usb_autosuspend_device(udev); | 3188 | usb_autosuspend_device(udev); |
3188 | return ret; | 3189 | return ret; |
3189 | } | 3190 | } |
3190 | EXPORT_SYMBOL(usb_reset_composite_device); | 3191 | EXPORT_SYMBOL_GPL(usb_reset_composite_device); |
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index fcd40ecbeecc..58b8e1c6b9a6 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -147,7 +147,7 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u | |||
147 | 147 | ||
148 | return ret; | 148 | return ret; |
149 | } | 149 | } |
150 | 150 | EXPORT_SYMBOL_GPL(usb_control_msg); | |
151 | 151 | ||
152 | /** | 152 | /** |
153 | * usb_interrupt_msg - Builds an interrupt urb, sends it off and waits for completion | 153 | * usb_interrupt_msg - Builds an interrupt urb, sends it off and waits for completion |
@@ -238,6 +238,7 @@ int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, | |||
238 | 238 | ||
239 | return usb_start_wait_urb(urb, timeout, actual_length); | 239 | return usb_start_wait_urb(urb, timeout, actual_length); |
240 | } | 240 | } |
241 | EXPORT_SYMBOL_GPL(usb_bulk_msg); | ||
241 | 242 | ||
242 | /*-------------------------------------------------------------------*/ | 243 | /*-------------------------------------------------------------------*/ |
243 | 244 | ||
@@ -465,7 +466,7 @@ nomem: | |||
465 | sg_clean (io); | 466 | sg_clean (io); |
466 | return -ENOMEM; | 467 | return -ENOMEM; |
467 | } | 468 | } |
468 | 469 | EXPORT_SYMBOL_GPL(usb_sg_init); | |
469 | 470 | ||
470 | /** | 471 | /** |
471 | * usb_sg_wait - synchronously execute scatter/gather request | 472 | * usb_sg_wait - synchronously execute scatter/gather request |
@@ -569,6 +570,7 @@ void usb_sg_wait (struct usb_sg_request *io) | |||
569 | 570 | ||
570 | sg_clean (io); | 571 | sg_clean (io); |
571 | } | 572 | } |
573 | EXPORT_SYMBOL_GPL(usb_sg_wait); | ||
572 | 574 | ||
573 | /** | 575 | /** |
574 | * usb_sg_cancel - stop scatter/gather i/o issued by usb_sg_wait() | 576 | * usb_sg_cancel - stop scatter/gather i/o issued by usb_sg_wait() |
@@ -604,6 +606,7 @@ void usb_sg_cancel (struct usb_sg_request *io) | |||
604 | } | 606 | } |
605 | spin_unlock_irqrestore (&io->lock, flags); | 607 | spin_unlock_irqrestore (&io->lock, flags); |
606 | } | 608 | } |
609 | EXPORT_SYMBOL_GPL(usb_sg_cancel); | ||
607 | 610 | ||
608 | /*-------------------------------------------------------------------*/ | 611 | /*-------------------------------------------------------------------*/ |
609 | 612 | ||
@@ -652,6 +655,7 @@ int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char | |||
652 | } | 655 | } |
653 | return result; | 656 | return result; |
654 | } | 657 | } |
658 | EXPORT_SYMBOL_GPL(usb_get_descriptor); | ||
655 | 659 | ||
656 | /** | 660 | /** |
657 | * usb_get_string - gets a string descriptor | 661 | * usb_get_string - gets a string descriptor |
@@ -827,6 +831,7 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size) | |||
827 | kfree(tbuf); | 831 | kfree(tbuf); |
828 | return err; | 832 | return err; |
829 | } | 833 | } |
834 | EXPORT_SYMBOL_GPL(usb_string); | ||
830 | 835 | ||
831 | /** | 836 | /** |
832 | * usb_cache_string - read a string descriptor and cache it for later use | 837 | * usb_cache_string - read a string descriptor and cache it for later use |
@@ -927,6 +932,7 @@ int usb_get_status(struct usb_device *dev, int type, int target, void *data) | |||
927 | kfree(status); | 932 | kfree(status); |
928 | return ret; | 933 | return ret; |
929 | } | 934 | } |
935 | EXPORT_SYMBOL_GPL(usb_get_status); | ||
930 | 936 | ||
931 | /** | 937 | /** |
932 | * usb_clear_halt - tells device to clear endpoint halt/stall condition | 938 | * usb_clear_halt - tells device to clear endpoint halt/stall condition |
@@ -985,6 +991,7 @@ int usb_clear_halt(struct usb_device *dev, int pipe) | |||
985 | 991 | ||
986 | return 0; | 992 | return 0; |
987 | } | 993 | } |
994 | EXPORT_SYMBOL_GPL(usb_clear_halt); | ||
988 | 995 | ||
989 | /** | 996 | /** |
990 | * usb_disable_endpoint -- Disable an endpoint by address | 997 | * usb_disable_endpoint -- Disable an endpoint by address |
@@ -1253,6 +1260,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) | |||
1253 | 1260 | ||
1254 | return 0; | 1261 | return 0; |
1255 | } | 1262 | } |
1263 | EXPORT_SYMBOL_GPL(usb_set_interface); | ||
1256 | 1264 | ||
1257 | /** | 1265 | /** |
1258 | * usb_reset_configuration - lightweight device reset | 1266 | * usb_reset_configuration - lightweight device reset |
@@ -1328,6 +1336,7 @@ int usb_reset_configuration(struct usb_device *dev) | |||
1328 | } | 1336 | } |
1329 | return 0; | 1337 | return 0; |
1330 | } | 1338 | } |
1339 | EXPORT_SYMBOL_GPL(usb_reset_configuration); | ||
1331 | 1340 | ||
1332 | static void usb_release_interface(struct device *dev) | 1341 | static void usb_release_interface(struct device *dev) |
1333 | { | 1342 | { |
@@ -1677,22 +1686,3 @@ int usb_driver_set_configuration(struct usb_device *udev, int config) | |||
1677 | return 0; | 1686 | return 0; |
1678 | } | 1687 | } |
1679 | EXPORT_SYMBOL_GPL(usb_driver_set_configuration); | 1688 | EXPORT_SYMBOL_GPL(usb_driver_set_configuration); |
1680 | |||
1681 | // synchronous request completion model | ||
1682 | EXPORT_SYMBOL(usb_control_msg); | ||
1683 | EXPORT_SYMBOL(usb_bulk_msg); | ||
1684 | |||
1685 | EXPORT_SYMBOL(usb_sg_init); | ||
1686 | EXPORT_SYMBOL(usb_sg_cancel); | ||
1687 | EXPORT_SYMBOL(usb_sg_wait); | ||
1688 | |||
1689 | // synchronous control message convenience routines | ||
1690 | EXPORT_SYMBOL(usb_get_descriptor); | ||
1691 | EXPORT_SYMBOL(usb_get_status); | ||
1692 | EXPORT_SYMBOL(usb_string); | ||
1693 | |||
1694 | // synchronous calls that also maintain usbcore state | ||
1695 | EXPORT_SYMBOL(usb_clear_halt); | ||
1696 | EXPORT_SYMBOL(usb_reset_configuration); | ||
1697 | EXPORT_SYMBOL(usb_set_interface); | ||
1698 | |||
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index d05ead20081c..0b54dc174e2c 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c | |||
@@ -42,6 +42,7 @@ void usb_init_urb(struct urb *urb) | |||
42 | INIT_LIST_HEAD(&urb->anchor_list); | 42 | INIT_LIST_HEAD(&urb->anchor_list); |
43 | } | 43 | } |
44 | } | 44 | } |
45 | EXPORT_SYMBOL_GPL(usb_init_urb); | ||
45 | 46 | ||
46 | /** | 47 | /** |
47 | * usb_alloc_urb - creates a new urb for a USB driver to use | 48 | * usb_alloc_urb - creates a new urb for a USB driver to use |
@@ -73,6 +74,7 @@ struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags) | |||
73 | usb_init_urb(urb); | 74 | usb_init_urb(urb); |
74 | return urb; | 75 | return urb; |
75 | } | 76 | } |
77 | EXPORT_SYMBOL_GPL(usb_alloc_urb); | ||
76 | 78 | ||
77 | /** | 79 | /** |
78 | * usb_free_urb - frees the memory used by a urb when all users of it are finished | 80 | * usb_free_urb - frees the memory used by a urb when all users of it are finished |
@@ -89,6 +91,7 @@ void usb_free_urb(struct urb *urb) | |||
89 | if (urb) | 91 | if (urb) |
90 | kref_put(&urb->kref, urb_destroy); | 92 | kref_put(&urb->kref, urb_destroy); |
91 | } | 93 | } |
94 | EXPORT_SYMBOL_GPL(usb_free_urb); | ||
92 | 95 | ||
93 | /** | 96 | /** |
94 | * usb_get_urb - increments the reference count of the urb | 97 | * usb_get_urb - increments the reference count of the urb |
@@ -106,6 +109,7 @@ struct urb * usb_get_urb(struct urb *urb) | |||
106 | kref_get(&urb->kref); | 109 | kref_get(&urb->kref); |
107 | return urb; | 110 | return urb; |
108 | } | 111 | } |
112 | EXPORT_SYMBOL_GPL(usb_get_urb); | ||
109 | 113 | ||
110 | /** | 114 | /** |
111 | * usb_anchor_urb - anchors an URB while it is processed | 115 | * usb_anchor_urb - anchors an URB while it is processed |
@@ -444,6 +448,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) | |||
444 | 448 | ||
445 | return usb_hcd_submit_urb(urb, mem_flags); | 449 | return usb_hcd_submit_urb(urb, mem_flags); |
446 | } | 450 | } |
451 | EXPORT_SYMBOL_GPL(usb_submit_urb); | ||
447 | 452 | ||
448 | /*-------------------------------------------------------------------*/ | 453 | /*-------------------------------------------------------------------*/ |
449 | 454 | ||
@@ -514,6 +519,7 @@ int usb_unlink_urb(struct urb *urb) | |||
514 | return -EIDRM; | 519 | return -EIDRM; |
515 | return usb_hcd_unlink_urb(urb, -ECONNRESET); | 520 | return usb_hcd_unlink_urb(urb, -ECONNRESET); |
516 | } | 521 | } |
522 | EXPORT_SYMBOL_GPL(usb_unlink_urb); | ||
517 | 523 | ||
518 | /** | 524 | /** |
519 | * usb_kill_urb - cancel a transfer request and wait for it to finish | 525 | * usb_kill_urb - cancel a transfer request and wait for it to finish |
@@ -553,6 +559,7 @@ void usb_kill_urb(struct urb *urb) | |||
553 | --urb->reject; | 559 | --urb->reject; |
554 | mutex_unlock(&reject_mutex); | 560 | mutex_unlock(&reject_mutex); |
555 | } | 561 | } |
562 | EXPORT_SYMBOL_GPL(usb_kill_urb); | ||
556 | 563 | ||
557 | /** | 564 | /** |
558 | * usb_kill_anchored_urbs - cancel transfer requests en masse | 565 | * usb_kill_anchored_urbs - cancel transfer requests en masse |
@@ -595,11 +602,3 @@ int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, | |||
595 | msecs_to_jiffies(timeout)); | 602 | msecs_to_jiffies(timeout)); |
596 | } | 603 | } |
597 | EXPORT_SYMBOL_GPL(usb_wait_anchor_empty_timeout); | 604 | EXPORT_SYMBOL_GPL(usb_wait_anchor_empty_timeout); |
598 | |||
599 | EXPORT_SYMBOL(usb_init_urb); | ||
600 | EXPORT_SYMBOL(usb_alloc_urb); | ||
601 | EXPORT_SYMBOL(usb_free_urb); | ||
602 | EXPORT_SYMBOL(usb_get_urb); | ||
603 | EXPORT_SYMBOL(usb_submit_urb); | ||
604 | EXPORT_SYMBOL(usb_unlink_urb); | ||
605 | EXPORT_SYMBOL(usb_kill_urb); | ||
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index fdb444d81271..8c6319afa757 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -96,6 +96,7 @@ struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev, | |||
96 | 96 | ||
97 | return NULL; | 97 | return NULL; |
98 | } | 98 | } |
99 | EXPORT_SYMBOL_GPL(usb_ifnum_to_if); | ||
99 | 100 | ||
100 | /** | 101 | /** |
101 | * usb_altnum_to_altsetting - get the altsetting structure with a given | 102 | * usb_altnum_to_altsetting - get the altsetting structure with a given |
@@ -126,6 +127,7 @@ struct usb_host_interface *usb_altnum_to_altsetting(const struct usb_interface * | |||
126 | } | 127 | } |
127 | return NULL; | 128 | return NULL; |
128 | } | 129 | } |
130 | EXPORT_SYMBOL_GPL(usb_altnum_to_altsetting); | ||
129 | 131 | ||
130 | struct find_interface_arg { | 132 | struct find_interface_arg { |
131 | int minor; | 133 | int minor; |
@@ -170,6 +172,7 @@ struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor) | |||
170 | __find_interface); | 172 | __find_interface); |
171 | return argb.interface; | 173 | return argb.interface; |
172 | } | 174 | } |
175 | EXPORT_SYMBOL_GPL(usb_find_interface); | ||
173 | 176 | ||
174 | /** | 177 | /** |
175 | * usb_release_dev - free a usb device structure when all users of it are finished. | 178 | * usb_release_dev - free a usb device structure when all users of it are finished. |
@@ -369,6 +372,7 @@ struct usb_device *usb_get_dev(struct usb_device *dev) | |||
369 | get_device(&dev->dev); | 372 | get_device(&dev->dev); |
370 | return dev; | 373 | return dev; |
371 | } | 374 | } |
375 | EXPORT_SYMBOL_GPL(usb_get_dev); | ||
372 | 376 | ||
373 | /** | 377 | /** |
374 | * usb_put_dev - release a use of the usb device structure | 378 | * usb_put_dev - release a use of the usb device structure |
@@ -382,6 +386,7 @@ void usb_put_dev(struct usb_device *dev) | |||
382 | if (dev) | 386 | if (dev) |
383 | put_device(&dev->dev); | 387 | put_device(&dev->dev); |
384 | } | 388 | } |
389 | EXPORT_SYMBOL_GPL(usb_put_dev); | ||
385 | 390 | ||
386 | /** | 391 | /** |
387 | * usb_get_intf - increments the reference count of the usb interface structure | 392 | * usb_get_intf - increments the reference count of the usb interface structure |
@@ -402,6 +407,7 @@ struct usb_interface *usb_get_intf(struct usb_interface *intf) | |||
402 | get_device(&intf->dev); | 407 | get_device(&intf->dev); |
403 | return intf; | 408 | return intf; |
404 | } | 409 | } |
410 | EXPORT_SYMBOL_GPL(usb_get_intf); | ||
405 | 411 | ||
406 | /** | 412 | /** |
407 | * usb_put_intf - release a use of the usb interface structure | 413 | * usb_put_intf - release a use of the usb interface structure |
@@ -416,7 +422,7 @@ void usb_put_intf(struct usb_interface *intf) | |||
416 | if (intf) | 422 | if (intf) |
417 | put_device(&intf->dev); | 423 | put_device(&intf->dev); |
418 | } | 424 | } |
419 | 425 | EXPORT_SYMBOL_GPL(usb_put_intf); | |
420 | 426 | ||
421 | /* USB device locking | 427 | /* USB device locking |
422 | * | 428 | * |
@@ -489,7 +495,7 @@ int usb_lock_device_for_reset(struct usb_device *udev, | |||
489 | } | 495 | } |
490 | return 1; | 496 | return 1; |
491 | } | 497 | } |
492 | 498 | EXPORT_SYMBOL_GPL(usb_lock_device_for_reset); | |
493 | 499 | ||
494 | static struct usb_device *match_device(struct usb_device *dev, | 500 | static struct usb_device *match_device(struct usb_device *dev, |
495 | u16 vendor_id, u16 product_id) | 501 | u16 vendor_id, u16 product_id) |
@@ -578,6 +584,7 @@ int usb_get_current_frame_number(struct usb_device *dev) | |||
578 | { | 584 | { |
579 | return usb_hcd_get_frame_number(dev); | 585 | return usb_hcd_get_frame_number(dev); |
580 | } | 586 | } |
587 | EXPORT_SYMBOL_GPL(usb_get_current_frame_number); | ||
581 | 588 | ||
582 | /*-------------------------------------------------------------------*/ | 589 | /*-------------------------------------------------------------------*/ |
583 | /* | 590 | /* |
@@ -612,6 +619,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size, | |||
612 | } | 619 | } |
613 | return -1; | 620 | return -1; |
614 | } | 621 | } |
622 | EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor); | ||
615 | 623 | ||
616 | /** | 624 | /** |
617 | * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP | 625 | * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP |
@@ -646,6 +654,7 @@ void *usb_buffer_alloc( | |||
646 | return NULL; | 654 | return NULL; |
647 | return hcd_buffer_alloc(dev->bus, size, mem_flags, dma); | 655 | return hcd_buffer_alloc(dev->bus, size, mem_flags, dma); |
648 | } | 656 | } |
657 | EXPORT_SYMBOL_GPL(usb_buffer_alloc); | ||
649 | 658 | ||
650 | /** | 659 | /** |
651 | * usb_buffer_free - free memory allocated with usb_buffer_alloc() | 660 | * usb_buffer_free - free memory allocated with usb_buffer_alloc() |
@@ -671,6 +680,7 @@ void usb_buffer_free( | |||
671 | return; | 680 | return; |
672 | hcd_buffer_free(dev->bus, size, addr, dma); | 681 | hcd_buffer_free(dev->bus, size, addr, dma); |
673 | } | 682 | } |
683 | EXPORT_SYMBOL_GPL(usb_buffer_free); | ||
674 | 684 | ||
675 | /** | 685 | /** |
676 | * usb_buffer_map - create DMA mapping(s) for an urb | 686 | * usb_buffer_map - create DMA mapping(s) for an urb |
@@ -718,6 +728,7 @@ struct urb *usb_buffer_map(struct urb *urb) | |||
718 | | URB_NO_SETUP_DMA_MAP); | 728 | | URB_NO_SETUP_DMA_MAP); |
719 | return urb; | 729 | return urb; |
720 | } | 730 | } |
731 | EXPORT_SYMBOL_GPL(usb_buffer_map); | ||
721 | #endif /* 0 */ | 732 | #endif /* 0 */ |
722 | 733 | ||
723 | /* XXX DISABLED, no users currently. If you wish to re-enable this | 734 | /* XXX DISABLED, no users currently. If you wish to re-enable this |
@@ -755,6 +766,7 @@ void usb_buffer_dmasync(struct urb *urb) | |||
755 | DMA_TO_DEVICE); | 766 | DMA_TO_DEVICE); |
756 | } | 767 | } |
757 | } | 768 | } |
769 | EXPORT_SYMBOL_GPL(usb_buffer_dmasync); | ||
758 | #endif | 770 | #endif |
759 | 771 | ||
760 | /** | 772 | /** |
@@ -790,6 +802,7 @@ void usb_buffer_unmap(struct urb *urb) | |||
790 | urb->transfer_flags &= ~(URB_NO_TRANSFER_DMA_MAP | 802 | urb->transfer_flags &= ~(URB_NO_TRANSFER_DMA_MAP |
791 | | URB_NO_SETUP_DMA_MAP); | 803 | | URB_NO_SETUP_DMA_MAP); |
792 | } | 804 | } |
805 | EXPORT_SYMBOL_GPL(usb_buffer_unmap); | ||
793 | #endif /* 0 */ | 806 | #endif /* 0 */ |
794 | 807 | ||
795 | /** | 808 | /** |
@@ -834,6 +847,7 @@ int usb_buffer_map_sg(const struct usb_device *dev, int is_in, | |||
834 | return dma_map_sg(controller, sg, nents, | 847 | return dma_map_sg(controller, sg, nents, |
835 | is_in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); | 848 | is_in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); |
836 | } | 849 | } |
850 | EXPORT_SYMBOL_GPL(usb_buffer_map_sg); | ||
837 | 851 | ||
838 | /* XXX DISABLED, no users currently. If you wish to re-enable this | 852 | /* XXX DISABLED, no users currently. If you wish to re-enable this |
839 | * XXX please determine whether the sync is to transfer ownership of | 853 | * XXX please determine whether the sync is to transfer ownership of |
@@ -867,6 +881,7 @@ void usb_buffer_dmasync_sg(const struct usb_device *dev, int is_in, | |||
867 | dma_sync_sg(controller, sg, n_hw_ents, | 881 | dma_sync_sg(controller, sg, n_hw_ents, |
868 | is_in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); | 882 | is_in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); |
869 | } | 883 | } |
884 | EXPORT_SYMBOL_GPL(usb_buffer_dmasync_sg); | ||
870 | #endif | 885 | #endif |
871 | 886 | ||
872 | /** | 887 | /** |
@@ -893,6 +908,7 @@ void usb_buffer_unmap_sg(const struct usb_device *dev, int is_in, | |||
893 | dma_unmap_sg(controller, sg, n_hw_ents, | 908 | dma_unmap_sg(controller, sg, n_hw_ents, |
894 | is_in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); | 909 | is_in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); |
895 | } | 910 | } |
911 | EXPORT_SYMBOL_GPL(usb_buffer_unmap_sg); | ||
896 | 912 | ||
897 | /* format to disable USB on kernel command line is: nousb */ | 913 | /* format to disable USB on kernel command line is: nousb */ |
898 | __module_param_call("", nousb, param_set_bool, param_get_bool, &nousb, 0444); | 914 | __module_param_call("", nousb, param_set_bool, param_get_bool, &nousb, 0444); |
@@ -904,6 +920,7 @@ int usb_disabled(void) | |||
904 | { | 920 | { |
905 | return nousb; | 921 | return nousb; |
906 | } | 922 | } |
923 | EXPORT_SYMBOL_GPL(usb_disabled); | ||
907 | 924 | ||
908 | /* | 925 | /* |
909 | * Init | 926 | * Init |
@@ -985,45 +1002,4 @@ static void __exit usb_exit(void) | |||
985 | 1002 | ||
986 | subsys_initcall(usb_init); | 1003 | subsys_initcall(usb_init); |
987 | module_exit(usb_exit); | 1004 | module_exit(usb_exit); |
988 | |||
989 | /* | ||
990 | * USB may be built into the kernel or be built as modules. | ||
991 | * These symbols are exported for device (or host controller) | ||
992 | * driver modules to use. | ||
993 | */ | ||
994 | |||
995 | EXPORT_SYMBOL(usb_disabled); | ||
996 | |||
997 | EXPORT_SYMBOL_GPL(usb_get_intf); | ||
998 | EXPORT_SYMBOL_GPL(usb_put_intf); | ||
999 | |||
1000 | EXPORT_SYMBOL(usb_put_dev); | ||
1001 | EXPORT_SYMBOL(usb_get_dev); | ||
1002 | EXPORT_SYMBOL(usb_hub_tt_clear_buffer); | ||
1003 | |||
1004 | EXPORT_SYMBOL(usb_lock_device_for_reset); | ||
1005 | |||
1006 | EXPORT_SYMBOL(usb_find_interface); | ||
1007 | EXPORT_SYMBOL(usb_ifnum_to_if); | ||
1008 | EXPORT_SYMBOL(usb_altnum_to_altsetting); | ||
1009 | |||
1010 | EXPORT_SYMBOL(__usb_get_extra_descriptor); | ||
1011 | |||
1012 | EXPORT_SYMBOL(usb_get_current_frame_number); | ||
1013 | |||
1014 | EXPORT_SYMBOL(usb_buffer_alloc); | ||
1015 | EXPORT_SYMBOL(usb_buffer_free); | ||
1016 | |||
1017 | #if 0 | ||
1018 | EXPORT_SYMBOL(usb_buffer_map); | ||
1019 | EXPORT_SYMBOL(usb_buffer_dmasync); | ||
1020 | EXPORT_SYMBOL(usb_buffer_unmap); | ||
1021 | #endif | ||
1022 | |||
1023 | EXPORT_SYMBOL(usb_buffer_map_sg); | ||
1024 | #if 0 | ||
1025 | EXPORT_SYMBOL(usb_buffer_dmasync_sg); | ||
1026 | #endif | ||
1027 | EXPORT_SYMBOL(usb_buffer_unmap_sg); | ||
1028 | |||
1029 | MODULE_LICENSE("GPL"); | 1005 | MODULE_LICENSE("GPL"); |