net: dsa: microchip: remove unnecessary spi_set_drvdata()
Subsystems (5)
PATCH 1/3 net: dsa: microchip: remove unnecessary spi_set_drvdata()
Remove unnecessary spi_set_drvdata() in ksz_spi_remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove().
--- drivers/net/dsa/microchip/ksz_spi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/dsa/microchip/ksz_spi.c +0 -2
@@ -107,8 +107,6 @@ static void ksz_spi_remove(struct spi_device *spi)if (dev)ksz_switch_remove (dev); - -spi_set_drvdata (spi,NULL ); }static void ksz_spi_shutdown (struct spi_device *spi)
Signature · 1 line
2.25.1
PATCH 2/3 net: dsa: sja1105: remove unnecessary spi_set_drvdata()
Remove unnecessary spi_set_drvdata() in sja1105_remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove().
--- drivers/net/dsa/sja1105/sja1105_main.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/dsa/sja1105/sja1105_main.c +0 -2
@@ -3351,8 +3351,6 @@ static void sja1105_remove(struct spi_device *spi)return ;dsa_unregister_switch (priv->ds); - -spi_set_drvdata (spi,NULL ); }static void sja1105_shutdown (struct spi_device *spi)
Signature · 1 line
2.25.1
PATCH 3/3 net: dsa: vitesse-vsc73xx: remove unnecessary spi_set_drvdata()
In reply to Yang YingliangRemove unnecessary spi_set_drvdata() in vsc73xx_spi_remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove().
--- drivers/net/dsa/vitesse-vsc73xx-spi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/dsa/vitesse-vsc73xx-spi.c +0 -2
@@ -167,8 +167,6 @@ static void vsc73xx_spi_remove(struct spi_device *spi)return ;vsc73xx_remove (&vsc_spi->vsc); - -spi_set_drvdata (spi,NULL ); }static void vsc73xx_spi_shutdown (struct spi_device *spi)
Signature · 1 line
2.25.1
Vladimir Oltean
maintainerQuoted 6 lines · Yang Yingliang
Remove unnecessary
spi_set_drvdata()inksz_spi_remove(), thedriver_datawill be set to NULL indevice_unbind_cleanup()after calling ->remove().Signed-off-by Yang Yingliang <[email protected]>---
I would like all drivers in drivers/net/dsa/ to follow the same convention, which they currently do. They all call .*_set_drvdata.*NULL from ->remove(), why just patch the spi_set_drvdata() calls?
Hi Vladimir,
Quoted 10 lines · Vladimir Oltean
Quoted 6 lines · Yang Yingliang
Remove unnecessary
spi_set_drvdata()inksz_spi_remove(), thedriver_datawill be set to NULL indevice_unbind_cleanup()after calling ->remove().Signed-off-by Yang Yingliang <[email protected]>---
I would like all drivers in
drivers/net/dsa/to follow the same convention, which they currently do. They all call .*_set_drvdata.*NULL from ->remove(), why just patch thespi_set_drvdata()calls?
Yes, it's right, all the set_drvdata functions in ->remove() can be removed. I will send a v2 to remove all this calling.
Thanks,
Yang
Quoted 1 line
.