Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access

From: Andrew Lunn <andrew@lunn.ch>
Date: 2018-10-10 00:58:52
Also in: linux-usb

On Mon, Oct 08, 2018 at 09:09:54AM +0000, Igor Russkikh wrote:
Hi Andrew,
quoted
quoted
 
+	struct aqc111_data *aqc111_data = (struct aqc111_data *)dev->data[0];
Having to do this cast all the time is quiet ugly. It seems like some
other usb_net drivers use netdev_priv().
As I see most of usb usbnet based devices use the same theme with accessing
private data via dev->data.
Hi Igor

I just discovered driver_priv.

https://elixir.bootlin.com/linux/v4.19-rc7/source/include/linux/usb/usbnet.h#L33

It would be good to use that, to avoid the casts.

   Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help