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]
Date:   Thu, 21 Dec 2017 15:00:46 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     jassisinghbrar@...il.com
Cc:     netdev@...r.kernel.org, devicetree@...r.kernel.org,
        davem@...emloft.net, arnd.bergmann@...aro.org,
        ard.biesheuvel@...aro.org, robh+dt@...nel.org,
        mark.rutland@....com, masami.hiramatsu@...aro.org,
        Jassi Brar <jaswinder.singh@...aro.org>
Subject: Re: [PATCHv3 2/3] net: socionext: Add Synquacer NetSec driver

> +static int netsec_register_mdio(struct netsec_priv *priv, u32 phy_addr)
> +{
> +	struct mii_bus *bus;
> +	int ret;
> +
> +	bus = devm_mdiobus_alloc(priv->dev);
> +	if (!bus)
> +		return -ENOMEM;
> +
> +	snprintf(bus->id, MII_BUS_ID_SIZE, "%s", dev_name(priv->dev));
> +	bus->priv = priv;
> +	bus->name = "SNI NETSEC MDIO";
> +	bus->read = netsec_phy_read;
> +	bus->write = netsec_phy_write;
> +	bus->parent = priv->dev;
> +	priv->mii_bus = bus;
> +
> +	if (dev_of_node(priv->dev)) {
> +		struct device_node *parent = dev_of_node(priv->dev);
> +		struct device_node *child_node, *mdio_node = NULL;
> +
> +		for_each_child_of_node(parent, child_node) {
> +			if (of_device_is_compatible(child_node,
> +						    "socionext,snq-mdio")) {

Just use of_get_child_by_name(parent, "mdio");

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ