]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rsi: sdio: Migrate to use sdio specific shutdown function
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Mon, 12 Jan 2026 15:46:58 +0000 (16:46 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 27 Jan 2026 12:42:20 +0000 (13:42 +0100)
This saves a cast in the driver. The motivation is stop using the callback
.shutdown in rsi_driver.drv to make it possible to drop that.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/2909323889b8ad4732ef6a8e05b5c40487a6c4bb.1768232321.git.u.kleine-koenig@baylibre.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/rsi/rsi_91x_sdio.c

index 1e578533e47394d3e201d1707a003d87ca4fc208..ee7ad81c858df3b6d0b342b475177caf0200797c 100644 (file)
@@ -1443,9 +1443,8 @@ static int rsi_thaw(struct device *dev)
        return 0;
 }
 
-static void rsi_shutdown(struct device *dev)
+static void rsi_shutdown(struct sdio_func *pfunction)
 {
-       struct sdio_func *pfunction = dev_to_sdio_func(dev);
        struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
        struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
        struct ieee80211_hw *hw = adapter->hw;
@@ -1513,9 +1512,9 @@ static struct sdio_driver rsi_driver = {
        .remove     = rsi_disconnect,
        .id_table   = rsi_dev_table,
 #ifdef CONFIG_PM
+       .shutdown   = rsi_shutdown,
        .drv = {
                .pm = &rsi_pm_ops,
-               .shutdown   = rsi_shutdown,
        }
 #endif
 };