Netdev List
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <netdev@vger.kernel.org>
Cc: <olteanv@gmail.com>, <davem@davemloft.net>
Subject: [PATCH -next 2/3] net: dsa: sja1105: remove unnecessary spi_set_drvdata()
Date: Tue, 13 Sep 2022 22:44:05 +0800	[thread overview]
Message-ID: <20220913144406.2002409-2-yangyingliang@huawei.com> (raw)
In-Reply-To: <20220913144406.2002409-1-yangyingliang@huawei.com>

Remove unnecessary spi_set_drvdata() in sja1105_remove(), the
driver_data will be set to NULL in device_unbind_cleanup() after
calling ->remove().

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/dsa/sja1105/sja1105_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index b03d0d0c3dbf..412666111b0c 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -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)
-- 
2.25.1


  reply	other threads:[~2022-09-13 17:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 14:44 [PATCH -next 1/3] net: dsa: microchip: remove unnecessary spi_set_drvdata() Yang Yingliang
2022-09-13 14:44 ` Yang Yingliang [this message]
2022-09-13 14:44 ` [PATCH -next 3/3] net: dsa: vitesse-vsc73xx: " Yang Yingliang
2022-09-20 23:45 ` [PATCH -next 1/3] net: dsa: microchip: " Vladimir Oltean
2022-09-21  1:32   ` Yang Yingliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220913144406.2002409-2-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox