aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/usbatm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/atm/usbatm.c')
-rw-r--r--drivers/usb/atm/usbatm.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index d3448ca110ce..ee62b3576f94 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -86,7 +86,7 @@
86#ifdef VERBOSE_DEBUG 86#ifdef VERBOSE_DEBUG
87static int usbatm_print_packet(const unsigned char *data, int len); 87static int usbatm_print_packet(const unsigned char *data, int len);
88#define PACKETDEBUG(arg...) usbatm_print_packet(arg) 88#define PACKETDEBUG(arg...) usbatm_print_packet(arg)
89#define vdbg(arg...) dbg(arg) 89#define vdbg(arg...) dev_dbg(arg)
90#else 90#else
91#define PACKETDEBUG(arg...) 91#define PACKETDEBUG(arg...)
92#define vdbg(arg...) 92#define vdbg(arg...)
@@ -714,7 +714,7 @@ static void usbatm_destroy_instance(struct kref *kref)
714{ 714{
715 struct usbatm_data *instance = container_of(kref, struct usbatm_data, refcount); 715 struct usbatm_data *instance = container_of(kref, struct usbatm_data, refcount);
716 716
717 dbg("%s", __func__); 717 usb_dbg(instance, "%s\n", __func__);
718 718
719 tasklet_kill(&instance->rx_channel.tasklet); 719 tasklet_kill(&instance->rx_channel.tasklet);
720 tasklet_kill(&instance->tx_channel.tasklet); 720 tasklet_kill(&instance->tx_channel.tasklet);
@@ -724,14 +724,14 @@ static void usbatm_destroy_instance(struct kref *kref)
724 724
725static void usbatm_get_instance(struct usbatm_data *instance) 725static void usbatm_get_instance(struct usbatm_data *instance)
726{ 726{
727 dbg("%s", __func__); 727 usb_dbg(instance, "%s\n", __func__);
728 728
729 kref_get(&instance->refcount); 729 kref_get(&instance->refcount);
730} 730}
731 731
732static void usbatm_put_instance(struct usbatm_data *instance) 732static void usbatm_put_instance(struct usbatm_data *instance)
733{ 733{
734 dbg("%s", __func__); 734 usb_dbg(instance, "%s\n", __func__);
735 735
736 kref_put(&instance->refcount, usbatm_destroy_instance); 736 kref_put(&instance->refcount, usbatm_destroy_instance);
737} 737}
@@ -745,11 +745,10 @@ static void usbatm_atm_dev_close(struct atm_dev *atm_dev)
745{ 745{
746 struct usbatm_data *instance = atm_dev->dev_data; 746 struct usbatm_data *instance = atm_dev->dev_data;
747 747
748 dbg("%s", __func__);
749
750 if (!instance) 748 if (!instance)
751 return; 749 return;
752 750
751 usb_dbg(instance, "%s\n", __func__);
753 atm_dev->dev_data = NULL; /* catch bugs */ 752 atm_dev->dev_data = NULL; /* catch bugs */
754 usbatm_put_instance(instance); /* taken in usbatm_atm_init */ 753 usbatm_put_instance(instance); /* taken in usbatm_atm_init */
755} 754}
@@ -759,10 +758,8 @@ static int usbatm_atm_proc_read(struct atm_dev *atm_dev, loff_t * pos, char *pag
759 struct usbatm_data *instance = atm_dev->dev_data; 758 struct usbatm_data *instance = atm_dev->dev_data;
760 int left = *pos; 759 int left = *pos;
761 760
762 if (!instance) { 761 if (!instance)
763 dbg("%s: NULL instance!", __func__);
764 return -ENODEV; 762 return -ENODEV;
765 }
766 763
767 if (!left--) 764 if (!left--)
768 return sprintf(page, "%s\n", instance->description); 765 return sprintf(page, "%s\n", instance->description);
@@ -804,10 +801,8 @@ static int usbatm_atm_open(struct atm_vcc *vcc)
804 int vci = vcc->vci; 801 int vci = vcc->vci;
805 short vpi = vcc->vpi; 802 short vpi = vcc->vpi;
806 803
807 if (!instance) { 804 if (!instance)
808 dbg("%s: NULL data!", __func__);
809 return -ENODEV; 805 return -ENODEV;
810 }
811 806
812 atm_dbg(instance, "%s: vpi %hd, vci %d\n", __func__, vpi, vci); 807 atm_dbg(instance, "%s: vpi %hd, vci %d\n", __func__, vpi, vci);
813 808
@@ -884,10 +879,8 @@ static void usbatm_atm_close(struct atm_vcc *vcc)
884 struct usbatm_data *instance = vcc->dev->dev_data; 879 struct usbatm_data *instance = vcc->dev->dev_data;
885 struct usbatm_vcc_data *vcc_data = vcc->dev_data; 880 struct usbatm_vcc_data *vcc_data = vcc->dev_data;
886 881
887 if (!instance || !vcc_data) { 882 if (!instance || !vcc_data)
888 dbg("%s: NULL data!", __func__);
889 return; 883 return;
890 }
891 884
892 atm_dbg(instance, "%s entered\n", __func__); 885 atm_dbg(instance, "%s entered\n", __func__);
893 886
@@ -929,10 +922,8 @@ static int usbatm_atm_ioctl(struct atm_dev *atm_dev, unsigned int cmd,
929{ 922{
930 struct usbatm_data *instance = atm_dev->dev_data; 923 struct usbatm_data *instance = atm_dev->dev_data;
931 924
932 if (!instance || instance->disconnected) { 925 if (!instance || instance->disconnected)
933 dbg("%s: %s!", __func__, instance ? "disconnected" : "NULL instance");
934 return -ENODEV; 926 return -ENODEV;
935 }
936 927
937 switch (cmd) { 928 switch (cmd) {
938 case ATM_QUERYLOOP: 929 case ATM_QUERYLOOP:
@@ -1336,8 +1327,6 @@ EXPORT_SYMBOL_GPL(usbatm_usb_disconnect);
1336 1327
1337static int __init usbatm_usb_init(void) 1328static int __init usbatm_usb_init(void)
1338{ 1329{
1339 dbg("%s: driver version %s", __func__, DRIVER_VERSION);
1340
1341 if (sizeof(struct usbatm_control) > FIELD_SIZEOF(struct sk_buff, cb)) { 1330 if (sizeof(struct usbatm_control) > FIELD_SIZEOF(struct sk_buff, cb)) {
1342 printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name); 1331 printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name);
1343 return -EIO; 1332 return -EIO;
@@ -1357,7 +1346,6 @@ module_init(usbatm_usb_init);
1357 1346
1358static void __exit usbatm_usb_exit(void) 1347static void __exit usbatm_usb_exit(void)
1359{ 1348{
1360 dbg("%s", __func__);
1361} 1349}
1362module_exit(usbatm_usb_exit); 1350module_exit(usbatm_usb_exit);
1363 1351