Subject: Re: [PATCH net-next 4/6] net: pcs: lynx: add lynx_pcs_create_mdiodev()

From: [email-masked]
Date: Fri, 26 May 2023 21:22:58 +0300

Fri, May 26, 2023 at 11:14:39AM +0100, Russell King (Oracle) kirjoitti:
> Add lynx_pcs_create_mdiodev() to simplify the creation of the mdio
> device associated with lynx PCS. In order to allow lynx_pcs_destroy()
> to clean this up, we need to arrange for lynx_pcs_create() to take a
> refcount on the mdiodev, and lynx_pcs_destroy() to put it.
> 
> Adding the refcounting to lynx_pcs_create()..lynx_pcs_destroy() will
> be transparent to existing users of these interfaces.

...

> +	mdio_device_get(mdio);
>  	lynx->mdio = mdio;

Just for the sake of example of how it can be used (taking into account my
previous comment):

  	lynx->mdio = mdio_device_get(mdio);

-- 
With Best Regards,
Andy Shevchenko