Skip to content

Commit

Permalink
USB: cdc-wdm: avoid printing odd-looking "cdc-wdm-176" names
Browse files Browse the repository at this point in the history
usb_register_dev() will change our .minor_base to 0 if
CONFIG_USB_DYNAMIC_MINORS is set.  And it usually is, of
course.

Use dev_name() to print the proper interface name instead

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bjørn Mork authored and Greg Kroah-Hartman committed Jan 24, 2012
1 parent 7e3054a commit 820c629
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,7 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
if (rv < 0)
goto err2;
else
dev_info(&intf->dev, "cdc-wdm%d: USB WDM device\n",
intf->minor - WDM_MINOR_BASE);
dev_info(&intf->dev, "%s: USB WDM device\n", dev_name(intf->usb_dev));
out:
return rv;
err2:
Expand Down

0 comments on commit 820c629

Please sign in to comment.