Skip to content

Commit

Permalink
USB: remove info() macro from usb/misc drivers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Oct 17, 2008
1 parent c197a8d commit 1b29a37
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 34 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/misc/adutux.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,9 @@ static int __init adu_init(void)
goto exit;
}

info("adutux " DRIVER_DESC " " DRIVER_VERSION);
info("adutux is an experimental driver. Use at your own risk");
printk(KERN_INFO "adutux " DRIVER_DESC " " DRIVER_VERSION "\n");
printk(KERN_INFO "adutux is an experimental driver. "
"Use at your own risk\n");

exit:
dbg(2," %s : leave, return value %d", __func__, result);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/misc/cytherm.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ static int __init usb_cytherm_init(void)
return result;
}

info(DRIVER_VERSION ":" DRIVER_DESC);
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
DRIVER_DESC "\n");
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/misc/emi26.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static int emi26_writememory (struct usb_device *dev, int address,
static int emi26_set_reset (struct usb_device *dev, unsigned char reset_bit)
{
int response;
info("%s - %d", __func__, reset_bit);
dev_info(&dev->dev, "%s - %d\n", __func__, reset_bit);
/* printk(KERN_DEBUG "%s - %d", __func__, reset_bit); */
response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
if (response < 0) {
Expand Down Expand Up @@ -254,7 +254,7 @@ static int emi26_probe(struct usb_interface *intf, const struct usb_device_id *i
{
struct usb_device *dev = interface_to_usbdev(intf);

info("%s start", __func__);
dev_info(&intf->dev, "%s start\n", __func__);

emi26_load_firmware(dev);

Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/misc/emi62.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static int emi62_writememory(struct usb_device *dev, int address,
static int emi62_set_reset (struct usb_device *dev, unsigned char reset_bit)
{
int response;
info("%s - %d", __func__, reset_bit);
dev_info(&dev->dev, "%s - %d\n", __func__, reset_bit);

response = emi62_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
if (response < 0) {
Expand Down Expand Up @@ -271,7 +271,7 @@ static int emi62_probe(struct usb_interface *intf, const struct usb_device_id *i
struct usb_device *dev = interface_to_usbdev(intf);
dev_dbg(&intf->dev, "emi62_probe\n");

info("%s start", __func__);
dev_info(&intf->dev, "%s start\n", __func__);

emi62_load_firmware(dev);

Expand Down
5 changes: 3 additions & 2 deletions drivers/usb/misc/idmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,15 @@ static void idmouse_disconnect(struct usb_interface *interface)
mutex_unlock(&dev->lock);
}

info("%s disconnected", DRIVER_DESC);
dev_info(&interface->dev, "disconnected\n");
}

static int __init usb_idmouse_init(void)
{
int result;

info(DRIVER_DESC " " DRIVER_VERSION);
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
DRIVER_DESC "\n");

/* register this driver with the USB subsystem */
result = usb_register(&idmouse_driver);
Expand Down
23 changes: 13 additions & 10 deletions drivers/usb/misc/legousbtower.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,8 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device

dbg(2, "%s: enter", __func__);

if (udev == NULL) {
info ("udev is NULL.");
}
if (udev == NULL)
dev_info(&interface->dev, "udev is NULL.\n");

/* allocate memory for our device state and initialize it */

Expand Down Expand Up @@ -954,7 +953,9 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
dev->minor = interface->minor;

/* let the user know what node this device is now attached to */
info ("LEGO USB Tower #%d now attached to major %d minor %d", (dev->minor - LEGO_USB_TOWER_MINOR_BASE), USB_MAJOR, dev->minor);
dev_info(&interface->dev, "LEGO USB Tower #%d now attached to major "
"%d minor %d\n", (dev->minor - LEGO_USB_TOWER_MINOR_BASE),
USB_MAJOR, dev->minor);

/* get the firmware version and log it */
result = usb_control_msg (udev,
Expand All @@ -971,10 +972,10 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
retval = result;
goto error;
}
info("LEGO USB Tower firmware version is %d.%d build %d",
get_version_reply.major,
get_version_reply.minor,
le16_to_cpu(get_version_reply.build_no));
dev_info(&interface->dev, "LEGO USB Tower firmware version is %d.%d "
"build %d\n", get_version_reply.major,
get_version_reply.minor,
le16_to_cpu(get_version_reply.build_no));


exit:
Expand Down Expand Up @@ -1021,7 +1022,8 @@ static void tower_disconnect (struct usb_interface *interface)
mutex_unlock(&dev->lock);
}

info("LEGO USB Tower #%d now disconnected", (minor - LEGO_USB_TOWER_MINOR_BASE));
dev_info(&interface->dev, "LEGO USB Tower #%d now disconnected\n",
(minor - LEGO_USB_TOWER_MINOR_BASE));

dbg(2, "%s: leave", __func__);
}
Expand All @@ -1046,7 +1048,8 @@ static int __init lego_usb_tower_init(void)
goto exit;
}

info(DRIVER_DESC " " DRIVER_VERSION);
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
DRIVER_DESC "\n");

exit:
dbg(2, "%s: leave, return value %d", __func__, retval);
Expand Down
11 changes: 6 additions & 5 deletions drivers/usb/misc/rio500.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static int open_rio(struct inode *inode, struct file *file)

mutex_unlock(&(rio->lock));

info("Rio opened.");
dev_info(&rio->rio_dev->dev, "Rio opened.\n");

return 0;
}
Expand All @@ -100,7 +100,7 @@ static int close_rio(struct inode *inode, struct file *file)

rio->isopen = 0;

info("Rio closed.");
dev_info(&rio->rio_dev->dev, "Rio closed.\n");
return 0;
}

Expand Down Expand Up @@ -451,7 +451,7 @@ static int probe_rio(struct usb_interface *intf,
struct rio_usb_data *rio = &rio_instance;
int retval;

info("USB Rio found at address %d", dev->devnum);
dev_info(&intf->dev, "USB Rio found at address %d\n", dev->devnum);

retval = usb_register_dev(intf, &usb_rio_class);
if (retval) {
Expand Down Expand Up @@ -503,7 +503,7 @@ static void disconnect_rio(struct usb_interface *intf)
kfree(rio->ibuf);
kfree(rio->obuf);

info("USB Rio disconnected.");
dev_info(&intf->dev, "USB Rio disconnected.\n");

rio->present = 0;
mutex_unlock(&(rio->lock));
Expand Down Expand Up @@ -531,7 +531,8 @@ static int __init usb_rio_init(void)
if (retval)
goto out;

info(DRIVER_VERSION ":" DRIVER_DESC);
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
DRIVER_DESC "\n");

out:
return retval;
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/misc/trancevibrator.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ static int __init tv_init(void)
return retval;
}

info(DRIVER_VERSION ":" DRIVER_DESC);
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
DRIVER_DESC "\n");
return 0;
}

Expand Down
11 changes: 6 additions & 5 deletions drivers/usb/misc/usblcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,13 @@ static int lcd_probe(struct usb_interface *interface, const struct usb_device_id

i = le16_to_cpu(dev->udev->descriptor.bcdDevice);

info("USBLCD Version %1d%1d.%1d%1d found at address %d",
(i & 0xF000)>>12,(i & 0xF00)>>8,(i & 0xF0)>>4,(i & 0xF),
dev->udev->devnum);
dev_info(&interface->dev, "USBLCD Version %1d%1d.%1d%1d found "
"at address %d\n", (i & 0xF000)>>12, (i & 0xF00)>>8,
(i & 0xF0)>>4,(i & 0xF), dev->udev->devnum);

/* let the user know what node this device is now attached to */
info("USB LCD device now attached to USBLCD-%d", interface->minor);
dev_info(&interface->dev, "USB LCD device now attached to USBLCD-%d\n",
interface->minor);
return 0;

error:
Expand Down Expand Up @@ -413,7 +414,7 @@ static void lcd_disconnect(struct usb_interface *interface)
/* decrement our usage count */
kref_put(&dev->kref, lcd_delete);

info("USB LCD #%d now disconnected", minor);
dev_info(&interface->dev, "USB LCD #%d now disconnected\n", minor);
}

static struct usb_driver lcd_driver = {
Expand Down
12 changes: 8 additions & 4 deletions drivers/usb/misc/uss720.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,14 @@ static int __init uss720_init(void)
if (retval)
goto out;

info(DRIVER_VERSION ":" DRIVER_DESC);
info("NOTE: this is a special purpose driver to allow nonstandard");
info("protocols (eg. bitbang) over USS720 usb to parallel cables");
info("If you just want to connect to a printer, use usblp instead");
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
DRIVER_DESC "\n");
printk(KERN_INFO KBUILD_MODNAME ": NOTE: this is a special purpose "
"driver to allow nonstandard\n");
printk(KERN_INFO KBUILD_MODNAME ": protocols (eg. bitbang) over "
"USS720 usb to parallel cables\n");
printk(KERN_INFO KBUILD_MODNAME ": If you just want to connect to a "
"printer, use usblp instead\n");
out:
return retval;
}
Expand Down

0 comments on commit 1b29a37

Please sign in to comment.