lkml.org 
[lkml]   [2024]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next RFC PATCH 1/6] net: phy: add support for defining multiple PHY IDs in PHY driver
> With the allocated mdio_devic_id it would result in this snipped
>
> const struct mdio_device_id *driver_dev_id;
> struct mdio_device_id *dev_id;
> int err = 0;
>
> phydev->drv = phydrv;
> /* Fill the mdio_device_id for the PHY istance.
> * If PHY driver provide an array of PHYs, search the right one,
> * in the other case fill it with the phy_driver data.
> */
> if (phy_driver_match(phydrv, phydev, &driver_dev_id) && driver_dev_id) {
> /* If defined, overwrite the PHY driver dev name with a
> * more specific one from the matching dev_id.
> */
> phydev->dev_id = driver_dev_id;
> if (driver_dev_id->name)
> drv->name = driver_dev_id->name;

What is drv here? You should not be changing the name within the
driver structure, since that is shared by a number of devices.

Andrew

\
 
 \ /
  Last update: 2024-05-27 15:09    [W:0.026 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site