memory: renesas-rpc-if: Remove Runtime PM wrappers
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 23 Nov 2022 14:41:22 +0000 (15:41 +0100)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 23 Jan 2023 10:48:00 +0000 (11:48 +0100)
Now the rpcif_{en,dis}able_rpm() wrappers just take a pointer to a
device structure, there is no point in keeping them.  Remove them, and
update the callers to call Runtime PM directly.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/d87aa5d7e4a39b18f7e2e0649fee0a45b45d371f.1669213027.git.geert+renesas@glider.be
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/mtd/hyperbus/rpc-if.c
drivers/spi/spi-rpc-if.c
include/memory/renesas-rpc-if.h

index 41734e337ac00e40e53fd8b19aaaf177f49428c4..ef32fca5f785e3766f3e08c8ddb84f9d7dc43856 100644 (file)
@@ -130,7 +130,7 @@ static int rpcif_hb_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, hyperbus);
 
-       rpcif_enable_rpm(hyperbus->rpc.dev);
+       pm_runtime_enable(hyperbus->rpc.dev);
 
        error = rpcif_hw_init(hyperbus->rpc.dev, true);
        if (error)
@@ -150,7 +150,7 @@ static int rpcif_hb_probe(struct platform_device *pdev)
        return 0;
 
 out_disable_rpm:
-       rpcif_disable_rpm(hyperbus->rpc.dev);
+       pm_runtime_disable(hyperbus->rpc.dev);
        return error;
 }
 
@@ -160,7 +160,7 @@ static int rpcif_hb_remove(struct platform_device *pdev)
 
        hyperbus_unregister_device(&hyperbus->hbdev);
 
-       rpcif_disable_rpm(hyperbus->rpc.dev);
+       pm_runtime_disable(hyperbus->rpc.dev);
 
        return 0;
 }
index 5063587d2c724c7c06c998a79f1bfdd8b1132065..ec0904faf3a10bd035aeef2771da363eb2572afe 100644 (file)
@@ -147,7 +147,7 @@ static int rpcif_spi_probe(struct platform_device *pdev)
 
        ctlr->dev.of_node = parent->of_node;
 
-       rpcif_enable_rpm(rpc->dev);
+       pm_runtime_enable(rpc->dev);
 
        ctlr->num_chipselect = 1;
        ctlr->mem_ops = &rpcif_spi_mem_ops;
@@ -169,7 +169,7 @@ static int rpcif_spi_probe(struct platform_device *pdev)
        return 0;
 
 out_disable_rpm:
-       rpcif_disable_rpm(rpc->dev);
+       pm_runtime_disable(rpc->dev);
        return error;
 }
 
@@ -179,7 +179,7 @@ static int rpcif_spi_remove(struct platform_device *pdev)
        struct rpcif *rpc = spi_controller_get_devdata(ctlr);
 
        spi_unregister_controller(ctlr);
-       rpcif_disable_rpm(rpc->dev);
+       pm_runtime_disable(rpc->dev);
 
        return 0;
 }
index 86a26ea78221a204e79b7c78ccd00be82b596370..b8fa30fd6b500c7391fb296875ec925b65ceae7a 100644 (file)
@@ -76,14 +76,4 @@ void rpcif_prepare(struct device *dev, const struct rpcif_op *op, u64 *offs,
 int rpcif_manual_xfer(struct device *dev);
 ssize_t rpcif_dirmap_read(struct device *dev, u64 offs, size_t len, void *buf);
 
-static inline void rpcif_enable_rpm(struct device *dev)
-{
-       pm_runtime_enable(dev);
-}
-
-static inline void rpcif_disable_rpm(struct device *dev)
-{
-       pm_runtime_disable(dev);
-}
-
 #endif // __RENESAS_RPC_IF_H