Re: [net-next PATCH v6 5/6] phylink: introduce phylink_fwnode_phy_connect()

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

 




On 7/10/2020 11:55 PM, Calvin Johnson wrote:
> Define phylink_fwnode_phy_connect() to connect phy specified by
> a fwnode to a phylink instance.
> 
> Signed-off-by: Calvin Johnson <calvin.johnson@xxxxxxxxxxx>
> 
> ---

[snip]

> +int phylink_fwnode_phy_connect(struct phylink *pl,
> +			       struct fwnode_handle *fwnode,
> +			       u32 flags)
> +{
> +	struct phy_device *phy_dev;
> +
> +	if (is_of_node(fwnode))
> +		return phylink_of_phy_connect(pl, to_of_node(fwnode), flags);
> +	if (is_acpi_device_node(fwnode)) {
> +		phy_dev = phy_find_by_mdio_handle(fwnode);
> +		if (!phy_dev)
> +			return -ENODEV;

Please also assign dev_flags to the phy_dev for symmetry with the
phylink_of_phy_connect() function:

		phy_dev->dev_flags |= flags;

With that fixed:

Reviewed-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
-- 
Florian



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux