lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGVrzcZEOLcrzQd=PA+=9PudJQby52F9+8koEZkOESsbSEkuug@mail.gmail.com>
Date:	Tue, 6 May 2014 10:06:14 -0700
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Daniel Mack <zonque@...il.com>
Cc:	mugunthanvnm <mugunthanvnm@...com>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: mdio: of_mdiobus_register(): fall back to
 mdiobus_register() for !CONFIG_OF

2014-05-06 9:52 GMT-07:00 Daniel Mack <zonque@...il.com>:
> If CONFIG_OF is not set, make of_mdiobus_register() call
> mdiobus_register() instead of returning -ENOSYS.
>
> This way, we can just call of_mdiobus_register() from all DT-enabled
> drivers to handle the compat cases.
>
> Signed-off-by: Daniel Mack <zonque@...il.com>
> Suggested-by: Florian Fainelli <f.fainelli@...il.com>

Acked-by: Florian Fainelli <f.fainelli@...il.com>

> ---
>  include/linux/of_mdio.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
> index 6fe8464..881a7c3 100644
> --- a/include/linux/of_mdio.h
> +++ b/include/linux/of_mdio.h
> @@ -31,7 +31,12 @@ extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np);
>  #else /* CONFIG_OF */
>  static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
>  {
> -       return -ENOSYS;
> +       /*
> +        * Fall back to the non-DT function to register a bus.
> +        * This way, we don't have to keep compat bits around in drivers.
> +        */
> +
> +       return mdiobus_register(mdio);
>  }
>
>  static inline struct phy_device *of_phy_find_device(struct device_node *phy_np)
> --
> 1.9.0
>



-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ