aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/urb.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-01-25 12:12:21 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 17:35:07 -0500
commit782e70c6fc2290a0395850e8e02583b8b62264d8 (patch)
tree455cb28ce894ba26d18011129c6bbdf59ed2879b /drivers/usb/core/urb.c
parent667d691ed7a70c9a9fde5b6bd663a5f38326e026 (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/core/urb.c')
-rw-r--r--drivers/usb/core/urb.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index d05ead20081..0b54dc174e2 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}
45EXPORT_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}
77EXPORT_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}
94EXPORT_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}
112EXPORT_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}
451EXPORT_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}
522EXPORT_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}
562EXPORT_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}
597EXPORT_SYMBOL_GPL(usb_wait_anchor_empty_timeout); 604EXPORT_SYMBOL_GPL(usb_wait_anchor_empty_timeout);
598
599EXPORT_SYMBOL(usb_init_urb);
600EXPORT_SYMBOL(usb_alloc_urb);
601EXPORT_SYMBOL(usb_free_urb);
602EXPORT_SYMBOL(usb_get_urb);
603EXPORT_SYMBOL(usb_submit_urb);
604EXPORT_SYMBOL(usb_unlink_urb);
605EXPORT_SYMBOL(usb_kill_urb);