Commit 1b29a375fb0b79a11a2d18e7bf5f6da422a35025
1 parent
c197a8db59
Exists in
master
and in
7 other branches
USB: remove info() macro from usb/misc drivers
USB should not be having it's own printk macros, so remove info() and use the system-wide standard of dev_info() wherever possible. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 10 changed files with 47 additions and 34 deletions Side-by-side Diff
drivers/usb/misc/adutux.c
... | ... | @@ -895,8 +895,9 @@ |
895 | 895 | goto exit; |
896 | 896 | } |
897 | 897 | |
898 | - info("adutux " DRIVER_DESC " " DRIVER_VERSION); | |
899 | - info("adutux is an experimental driver. Use at your own risk"); | |
898 | + printk(KERN_INFO "adutux " DRIVER_DESC " " DRIVER_VERSION "\n"); | |
899 | + printk(KERN_INFO "adutux is an experimental driver. " | |
900 | + "Use at your own risk\n"); | |
900 | 901 | |
901 | 902 | exit: |
902 | 903 | dbg(2," %s : leave, return value %d", __func__, result); |
drivers/usb/misc/cytherm.c
drivers/usb/misc/emi26.c
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | static int emi26_set_reset (struct usb_device *dev, unsigned char reset_bit) |
65 | 65 | { |
66 | 66 | int response; |
67 | - info("%s - %d", __func__, reset_bit); | |
67 | + dev_info(&dev->dev, "%s - %d\n", __func__, reset_bit); | |
68 | 68 | /* printk(KERN_DEBUG "%s - %d", __func__, reset_bit); */ |
69 | 69 | response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0); |
70 | 70 | if (response < 0) { |
... | ... | @@ -254,7 +254,7 @@ |
254 | 254 | { |
255 | 255 | struct usb_device *dev = interface_to_usbdev(intf); |
256 | 256 | |
257 | - info("%s start", __func__); | |
257 | + dev_info(&intf->dev, "%s start\n", __func__); | |
258 | 258 | |
259 | 259 | emi26_load_firmware(dev); |
260 | 260 |
drivers/usb/misc/emi62.c
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | static int emi62_set_reset (struct usb_device *dev, unsigned char reset_bit) |
74 | 74 | { |
75 | 75 | int response; |
76 | - info("%s - %d", __func__, reset_bit); | |
76 | + dev_info(&dev->dev, "%s - %d\n", __func__, reset_bit); | |
77 | 77 | |
78 | 78 | response = emi62_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0); |
79 | 79 | if (response < 0) { |
... | ... | @@ -271,7 +271,7 @@ |
271 | 271 | struct usb_device *dev = interface_to_usbdev(intf); |
272 | 272 | dev_dbg(&intf->dev, "emi62_probe\n"); |
273 | 273 | |
274 | - info("%s start", __func__); | |
274 | + dev_info(&intf->dev, "%s start\n", __func__); | |
275 | 275 | |
276 | 276 | emi62_load_firmware(dev); |
277 | 277 |
drivers/usb/misc/idmouse.c
... | ... | @@ -403,14 +403,15 @@ |
403 | 403 | mutex_unlock(&dev->lock); |
404 | 404 | } |
405 | 405 | |
406 | - info("%s disconnected", DRIVER_DESC); | |
406 | + dev_info(&interface->dev, "disconnected\n"); | |
407 | 407 | } |
408 | 408 | |
409 | 409 | static int __init usb_idmouse_init(void) |
410 | 410 | { |
411 | 411 | int result; |
412 | 412 | |
413 | - info(DRIVER_DESC " " DRIVER_VERSION); | |
413 | + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | |
414 | + DRIVER_DESC "\n"); | |
414 | 415 | |
415 | 416 | /* register this driver with the USB subsystem */ |
416 | 417 | result = usb_register(&idmouse_driver); |
drivers/usb/misc/legousbtower.c
... | ... | @@ -851,9 +851,8 @@ |
851 | 851 | |
852 | 852 | dbg(2, "%s: enter", __func__); |
853 | 853 | |
854 | - if (udev == NULL) { | |
855 | - info ("udev is NULL."); | |
856 | - } | |
854 | + if (udev == NULL) | |
855 | + dev_info(&interface->dev, "udev is NULL.\n"); | |
857 | 856 | |
858 | 857 | /* allocate memory for our device state and initialize it */ |
859 | 858 | |
... | ... | @@ -954,7 +953,9 @@ |
954 | 953 | dev->minor = interface->minor; |
955 | 954 | |
956 | 955 | /* let the user know what node this device is now attached to */ |
957 | - info ("LEGO USB Tower #%d now attached to major %d minor %d", (dev->minor - LEGO_USB_TOWER_MINOR_BASE), USB_MAJOR, dev->minor); | |
956 | + dev_info(&interface->dev, "LEGO USB Tower #%d now attached to major " | |
957 | + "%d minor %d\n", (dev->minor - LEGO_USB_TOWER_MINOR_BASE), | |
958 | + USB_MAJOR, dev->minor); | |
958 | 959 | |
959 | 960 | /* get the firmware version and log it */ |
960 | 961 | result = usb_control_msg (udev, |
... | ... | @@ -971,10 +972,10 @@ |
971 | 972 | retval = result; |
972 | 973 | goto error; |
973 | 974 | } |
974 | - info("LEGO USB Tower firmware version is %d.%d build %d", | |
975 | - get_version_reply.major, | |
976 | - get_version_reply.minor, | |
977 | - le16_to_cpu(get_version_reply.build_no)); | |
975 | + dev_info(&interface->dev, "LEGO USB Tower firmware version is %d.%d " | |
976 | + "build %d\n", get_version_reply.major, | |
977 | + get_version_reply.minor, | |
978 | + le16_to_cpu(get_version_reply.build_no)); | |
978 | 979 | |
979 | 980 | |
980 | 981 | exit: |
... | ... | @@ -1021,7 +1022,8 @@ |
1021 | 1022 | mutex_unlock(&dev->lock); |
1022 | 1023 | } |
1023 | 1024 | |
1024 | - info("LEGO USB Tower #%d now disconnected", (minor - LEGO_USB_TOWER_MINOR_BASE)); | |
1025 | + dev_info(&interface->dev, "LEGO USB Tower #%d now disconnected\n", | |
1026 | + (minor - LEGO_USB_TOWER_MINOR_BASE)); | |
1025 | 1027 | |
1026 | 1028 | dbg(2, "%s: leave", __func__); |
1027 | 1029 | } |
... | ... | @@ -1046,7 +1048,8 @@ |
1046 | 1048 | goto exit; |
1047 | 1049 | } |
1048 | 1050 | |
1049 | - info(DRIVER_DESC " " DRIVER_VERSION); | |
1051 | + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | |
1052 | + DRIVER_DESC "\n"); | |
1050 | 1053 | |
1051 | 1054 | exit: |
1052 | 1055 | dbg(2, "%s: leave, return value %d", __func__, retval); |
drivers/usb/misc/rio500.c
... | ... | @@ -89,7 +89,7 @@ |
89 | 89 | |
90 | 90 | mutex_unlock(&(rio->lock)); |
91 | 91 | |
92 | - info("Rio opened."); | |
92 | + dev_info(&rio->rio_dev->dev, "Rio opened.\n"); | |
93 | 93 | |
94 | 94 | return 0; |
95 | 95 | } |
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | |
101 | 101 | rio->isopen = 0; |
102 | 102 | |
103 | - info("Rio closed."); | |
103 | + dev_info(&rio->rio_dev->dev, "Rio closed.\n"); | |
104 | 104 | return 0; |
105 | 105 | } |
106 | 106 | |
... | ... | @@ -451,7 +451,7 @@ |
451 | 451 | struct rio_usb_data *rio = &rio_instance; |
452 | 452 | int retval; |
453 | 453 | |
454 | - info("USB Rio found at address %d", dev->devnum); | |
454 | + dev_info(&intf->dev, "USB Rio found at address %d\n", dev->devnum); | |
455 | 455 | |
456 | 456 | retval = usb_register_dev(intf, &usb_rio_class); |
457 | 457 | if (retval) { |
... | ... | @@ -503,7 +503,7 @@ |
503 | 503 | kfree(rio->ibuf); |
504 | 504 | kfree(rio->obuf); |
505 | 505 | |
506 | - info("USB Rio disconnected."); | |
506 | + dev_info(&intf->dev, "USB Rio disconnected.\n"); | |
507 | 507 | |
508 | 508 | rio->present = 0; |
509 | 509 | mutex_unlock(&(rio->lock)); |
... | ... | @@ -531,7 +531,8 @@ |
531 | 531 | if (retval) |
532 | 532 | goto out; |
533 | 533 | |
534 | - info(DRIVER_VERSION ":" DRIVER_DESC); | |
534 | + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | |
535 | + DRIVER_DESC "\n"); | |
535 | 536 | |
536 | 537 | out: |
537 | 538 | return retval; |
drivers/usb/misc/trancevibrator.c
drivers/usb/misc/usblcd.c
... | ... | @@ -359,12 +359,13 @@ |
359 | 359 | |
360 | 360 | i = le16_to_cpu(dev->udev->descriptor.bcdDevice); |
361 | 361 | |
362 | - info("USBLCD Version %1d%1d.%1d%1d found at address %d", | |
363 | - (i & 0xF000)>>12,(i & 0xF00)>>8,(i & 0xF0)>>4,(i & 0xF), | |
364 | - dev->udev->devnum); | |
362 | + dev_info(&interface->dev, "USBLCD Version %1d%1d.%1d%1d found " | |
363 | + "at address %d\n", (i & 0xF000)>>12, (i & 0xF00)>>8, | |
364 | + (i & 0xF0)>>4,(i & 0xF), dev->udev->devnum); | |
365 | 365 | |
366 | 366 | /* let the user know what node this device is now attached to */ |
367 | - info("USB LCD device now attached to USBLCD-%d", interface->minor); | |
367 | + dev_info(&interface->dev, "USB LCD device now attached to USBLCD-%d\n", | |
368 | + interface->minor); | |
368 | 369 | return 0; |
369 | 370 | |
370 | 371 | error: |
... | ... | @@ -413,7 +414,7 @@ |
413 | 414 | /* decrement our usage count */ |
414 | 415 | kref_put(&dev->kref, lcd_delete); |
415 | 416 | |
416 | - info("USB LCD #%d now disconnected", minor); | |
417 | + dev_info(&interface->dev, "USB LCD #%d now disconnected\n", minor); | |
417 | 418 | } |
418 | 419 | |
419 | 420 | static struct usb_driver lcd_driver = { |
drivers/usb/misc/uss720.c
... | ... | @@ -801,10 +801,14 @@ |
801 | 801 | if (retval) |
802 | 802 | goto out; |
803 | 803 | |
804 | - info(DRIVER_VERSION ":" DRIVER_DESC); | |
805 | - info("NOTE: this is a special purpose driver to allow nonstandard"); | |
806 | - info("protocols (eg. bitbang) over USS720 usb to parallel cables"); | |
807 | - info("If you just want to connect to a printer, use usblp instead"); | |
804 | + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | |
805 | + DRIVER_DESC "\n"); | |
806 | + printk(KERN_INFO KBUILD_MODNAME ": NOTE: this is a special purpose " | |
807 | + "driver to allow nonstandard\n"); | |
808 | + printk(KERN_INFO KBUILD_MODNAME ": protocols (eg. bitbang) over " | |
809 | + "USS720 usb to parallel cables\n"); | |
810 | + printk(KERN_INFO KBUILD_MODNAME ": If you just want to connect to a " | |
811 | + "printer, use usblp instead\n"); | |
808 | 812 | out: |
809 | 813 | return retval; |
810 | 814 | } |