diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-09-22 18:10:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-09-23 12:46:22 +0100 |
commit | 33e1501f5a5fd1d682d43c4f5a03bc6c9a742d1e (patch) | |
tree | cd92d4ea4d8bb27a580ae527d019057ca3800573 /drivers/net/dsa/sja1105/sja1105.h | |
parent | Merge branch 'ja1105-deps' (diff) | |
download | linux-dev-33e1501f5a5fd1d682d43c4f5a03bc6c9a742d1e.tar.xz linux-dev-33e1501f5a5fd1d682d43c4f5a03bc6c9a742d1e.zip |
net: dsa: sja1105: don't keep a persistent reference to the reset GPIO
The driver only needs the reset GPIO for a very brief period, so instead
of using devres and keeping the descriptor pointer inside priv, just use
that descriptor inside the sja1105_hw_reset function and then let go of
it.
Also use gpiod_get_optional while at it, and error out on real errors
(bad flags etc).
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105.h')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105.h b/drivers/net/dsa/sja1105/sja1105.h index 5e5d24e7c02b..6595348f1ea3 100644 --- a/drivers/net/dsa/sja1105/sja1105.h +++ b/drivers/net/dsa/sja1105/sja1105.h @@ -231,7 +231,6 @@ struct sja1105_private { unsigned long bcast_egress_floods; const struct sja1105_info *info; size_t max_xfer_len; - struct gpio_desc *reset_gpio; struct spi_device *spidev; struct dsa_switch *ds; u16 bridge_pvid[SJA1105_MAX_NUM_PORTS]; |