Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1312324
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] net: phy: smsc: Fix disabling energy detect mode |
| Date | 2016-01-19 16:30 +0100 |
| Message-ID | <qSGoh-1fW-1@gated-at.bofh.it> (permalink) |
| References | <qSzmO-4JC-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> +struct smsc_phy_priv {
> + bool energy_enable:1;
> +};
Time to show my ignorance of bitfields. Since this is a bool, does the
:1 actually do anything?
> +static int smsc_phy_probe(struct phy_device *phydev)
> +{
> + struct device *dev = &phydev->mdio.dev;
> + struct device_node *of_node __maybe_unused = dev->of_node;
> + struct smsc_phy_priv *priv;
> + int __maybe_unused len;
> +
> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;
> +
> + if (of_find_property(of_node, "smsc,disable-energy-detect", &len))
> + priv->energy_enable = false;
Here you set it to false. Where does it get set to true?
Also, of_property_read_bool() would be a better call than of_find_property.
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] net: phy: smsc: Fix disabling energy detect mode Teresa Remmet <t.remmet@phytec.de> - 2016-01-19 09:00 +0100
Re: [PATCH v2] net: phy: smsc: Fix disabling energy detect mode Andrew Lunn <andrew@lunn.ch> - 2016-01-19 16:30 +0100
Re: [PATCH v2] net: phy: smsc: Fix disabling energy detect mode David Miller <davem@davemloft.net> - 2016-01-19 20:40 +0100
csiph-web