Skip to content

Commit 27e5f98

Browse files
geertukrzk
authored andcommitted
memory: renesas-rpc-if: Remove Runtime PM wrappers
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 <[email protected]> Acked-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/d87aa5d7e4a39b18f7e2e0649fee0a45b45d371f.1669213027.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent a198fcd commit 27e5f98

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

Diff for: drivers/mtd/hyperbus/rpc-if.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static int rpcif_hb_probe(struct platform_device *pdev)
130130

131131
platform_set_drvdata(pdev, hyperbus);
132132

133-
rpcif_enable_rpm(hyperbus->rpc.dev);
133+
pm_runtime_enable(hyperbus->rpc.dev);
134134

135135
error = rpcif_hw_init(hyperbus->rpc.dev, true);
136136
if (error)
@@ -150,7 +150,7 @@ static int rpcif_hb_probe(struct platform_device *pdev)
150150
return 0;
151151

152152
out_disable_rpm:
153-
rpcif_disable_rpm(hyperbus->rpc.dev);
153+
pm_runtime_disable(hyperbus->rpc.dev);
154154
return error;
155155
}
156156

@@ -160,7 +160,7 @@ static int rpcif_hb_remove(struct platform_device *pdev)
160160

161161
hyperbus_unregister_device(&hyperbus->hbdev);
162162

163-
rpcif_disable_rpm(hyperbus->rpc.dev);
163+
pm_runtime_disable(hyperbus->rpc.dev);
164164

165165
return 0;
166166
}

Diff for: drivers/spi/spi-rpc-if.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static int rpcif_spi_probe(struct platform_device *pdev)
147147

148148
ctlr->dev.of_node = parent->of_node;
149149

150-
rpcif_enable_rpm(rpc->dev);
150+
pm_runtime_enable(rpc->dev);
151151

152152
ctlr->num_chipselect = 1;
153153
ctlr->mem_ops = &rpcif_spi_mem_ops;
@@ -169,7 +169,7 @@ static int rpcif_spi_probe(struct platform_device *pdev)
169169
return 0;
170170

171171
out_disable_rpm:
172-
rpcif_disable_rpm(rpc->dev);
172+
pm_runtime_disable(rpc->dev);
173173
return error;
174174
}
175175

@@ -179,7 +179,7 @@ static int rpcif_spi_remove(struct platform_device *pdev)
179179
struct rpcif *rpc = spi_controller_get_devdata(ctlr);
180180

181181
spi_unregister_controller(ctlr);
182-
rpcif_disable_rpm(rpc->dev);
182+
pm_runtime_disable(rpc->dev);
183183

184184
return 0;
185185
}

Diff for: include/memory/renesas-rpc-if.h

-10
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,4 @@ void rpcif_prepare(struct device *dev, const struct rpcif_op *op, u64 *offs,
7676
int rpcif_manual_xfer(struct device *dev);
7777
ssize_t rpcif_dirmap_read(struct device *dev, u64 offs, size_t len, void *buf);
7878

79-
static inline void rpcif_enable_rpm(struct device *dev)
80-
{
81-
pm_runtime_enable(dev);
82-
}
83-
84-
static inline void rpcif_disable_rpm(struct device *dev)
85-
{
86-
pm_runtime_disable(dev);
87-
}
88-
8979
#endif // __RENESAS_RPC_IF_H

0 commit comments

Comments
 (0)