Commit 4c2a47a287876c098b41e4244426deca68762afe
1 parent
d8995425ff
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
USB: usbatm.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Duncan Sands <duncan.sands@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 9 additions and 21 deletions Side-by-side Diff
drivers/usb/atm/usbatm.c
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 | #ifdef VERBOSE_DEBUG |
87 | 87 | static int usbatm_print_packet(const unsigned char *data, int len); |
88 | 88 | #define PACKETDEBUG(arg...) usbatm_print_packet(arg) |
89 | -#define vdbg(arg...) dbg(arg) | |
89 | +#define vdbg(arg...) dev_dbg(arg) | |
90 | 90 | #else |
91 | 91 | #define PACKETDEBUG(arg...) |
92 | 92 | #define vdbg(arg...) |
... | ... | @@ -714,7 +714,7 @@ |
714 | 714 | { |
715 | 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 | 719 | tasklet_kill(&instance->rx_channel.tasklet); |
720 | 720 | tasklet_kill(&instance->tx_channel.tasklet); |
721 | 721 | |
... | ... | @@ -724,14 +724,14 @@ |
724 | 724 | |
725 | 725 | static void usbatm_get_instance(struct usbatm_data *instance) |
726 | 726 | { |
727 | - dbg("%s", __func__); | |
727 | + usb_dbg(instance, "%s\n", __func__); | |
728 | 728 | |
729 | 729 | kref_get(&instance->refcount); |
730 | 730 | } |
731 | 731 | |
732 | 732 | static void usbatm_put_instance(struct usbatm_data *instance) |
733 | 733 | { |
734 | - dbg("%s", __func__); | |
734 | + usb_dbg(instance, "%s\n", __func__); | |
735 | 735 | |
736 | 736 | kref_put(&instance->refcount, usbatm_destroy_instance); |
737 | 737 | } |
738 | 738 | |
... | ... | @@ -745,11 +745,10 @@ |
745 | 745 | { |
746 | 746 | struct usbatm_data *instance = atm_dev->dev_data; |
747 | 747 | |
748 | - dbg("%s", __func__); | |
749 | - | |
750 | 748 | if (!instance) |
751 | 749 | return; |
752 | 750 | |
751 | + usb_dbg(instance, "%s\n", __func__); | |
753 | 752 | atm_dev->dev_data = NULL; /* catch bugs */ |
754 | 753 | usbatm_put_instance(instance); /* taken in usbatm_atm_init */ |
755 | 754 | } |
756 | 755 | |
... | ... | @@ -759,10 +758,8 @@ |
759 | 758 | struct usbatm_data *instance = atm_dev->dev_data; |
760 | 759 | int left = *pos; |
761 | 760 | |
762 | - if (!instance) { | |
763 | - dbg("%s: NULL instance!", __func__); | |
761 | + if (!instance) | |
764 | 762 | return -ENODEV; |
765 | - } | |
766 | 763 | |
767 | 764 | if (!left--) |
768 | 765 | return sprintf(page, "%s\n", instance->description); |
769 | 766 | |
... | ... | @@ -804,10 +801,8 @@ |
804 | 801 | int vci = vcc->vci; |
805 | 802 | short vpi = vcc->vpi; |
806 | 803 | |
807 | - if (!instance) { | |
808 | - dbg("%s: NULL data!", __func__); | |
804 | + if (!instance) | |
809 | 805 | return -ENODEV; |
810 | - } | |
811 | 806 | |
812 | 807 | atm_dbg(instance, "%s: vpi %hd, vci %d\n", __func__, vpi, vci); |
813 | 808 | |
814 | 809 | |
... | ... | @@ -884,10 +879,8 @@ |
884 | 879 | struct usbatm_data *instance = vcc->dev->dev_data; |
885 | 880 | struct usbatm_vcc_data *vcc_data = vcc->dev_data; |
886 | 881 | |
887 | - if (!instance || !vcc_data) { | |
888 | - dbg("%s: NULL data!", __func__); | |
882 | + if (!instance || !vcc_data) | |
889 | 883 | return; |
890 | - } | |
891 | 884 | |
892 | 885 | atm_dbg(instance, "%s entered\n", __func__); |
893 | 886 | |
894 | 887 | |
... | ... | @@ -929,10 +922,8 @@ |
929 | 922 | { |
930 | 923 | struct usbatm_data *instance = atm_dev->dev_data; |
931 | 924 | |
932 | - if (!instance || instance->disconnected) { | |
933 | - dbg("%s: %s!", __func__, instance ? "disconnected" : "NULL instance"); | |
925 | + if (!instance || instance->disconnected) | |
934 | 926 | return -ENODEV; |
935 | - } | |
936 | 927 | |
937 | 928 | switch (cmd) { |
938 | 929 | case ATM_QUERYLOOP: |
... | ... | @@ -1336,8 +1327,6 @@ |
1336 | 1327 | |
1337 | 1328 | static int __init usbatm_usb_init(void) |
1338 | 1329 | { |
1339 | - dbg("%s: driver version %s", __func__, DRIVER_VERSION); | |
1340 | - | |
1341 | 1330 | if (sizeof(struct usbatm_control) > FIELD_SIZEOF(struct sk_buff, cb)) { |
1342 | 1331 | printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name); |
1343 | 1332 | return -EIO; |
... | ... | @@ -1357,7 +1346,6 @@ |
1357 | 1346 | |
1358 | 1347 | static void __exit usbatm_usb_exit(void) |
1359 | 1348 | { |
1360 | - dbg("%s", __func__); | |
1361 | 1349 | } |
1362 | 1350 | module_exit(usbatm_usb_exit); |
1363 | 1351 |