Re: [patch v2] net/usb: remove err() messages in few drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Wednesday 14 January 2009 01:22:26 schrieb Alexey Klimov:
> > Use the interface passed into probe():  dev_err(&intf->dev, ...) etc

A USB driver is fundamentally a driver for a device's interfaces.
Therefore the interface's device struct is the obviously correct choice.

> Well, in few v4l-dvb drivers successfully used &radio->usbdev->dev in
> debug messages and that doesn't look wrong.

That will not allow you to identify which interface caused the message.
 
> Hmm, i see that struct usb_interface passed to probe function for
> example, and here in catc_irq_done struct urb passed, and then we have
> struct catc. So, messages based on catc->usbdev->dev. I can switch to
> &catc->netdev->dev when it's safe to do, right?

You cannot. The point of passing a device pointer is to identify the device.
The device in the network view and the USB view is not identical. You
have to pick one choice and stick with it and if for some reason that is not
possible you cannot use this debugging functions.

	Regards
		Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux