lkml.org 
[lkml]   [2020]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH net-next 1/3] net: phy: add concept of shared storage for PHYs
Am 2020-04-21 01:26, schrieb Michael Walle:
> +
> +/* Represents a shared structure between different phydev's in the
> same
> + * package, for example a quad PHY. See phy_package_join() and
> + * phy_package_leave().
> + */
> +struct phy_package_shared {
> + int addr;
> + refcount_t refcnt;
> + unsigned long flags;
> +
> + /* private data pointer */
> + /* note that this pointer is shared between different phydevs and
> + * the user has to take care of appropriate locking.
> + */
> + void *priv;

btw. how should a driver actually use this? I mean, it can allocate
memory if its still NULL but when will it be freed again. Do we need
a callback? Is there something better than a callback?

-michael

\
 
 \ /
  Last update: 2020-04-21 17:26    [W:0.094 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site