[PATCH 1/7] memory: renesas-rpc-if: Always use dev in rpcif_sw_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rpcif_sw_init() already has the "dev" parameter pointing to the right
device structure, so there is no need to take a detour through the
platform device.

Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
 drivers/memory/renesas-rpc-if.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
index 4316988d791a527f..829b962e8f034bdd 100644
--- a/drivers/memory/renesas-rpc-if.c
+++ b/drivers/memory/renesas-rpc-if.c
@@ -263,22 +263,21 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
 	if (IS_ERR(rpc->base))
 		return PTR_ERR(rpc->base);
 
-	rpc->regmap = devm_regmap_init(&pdev->dev, NULL, rpc, &rpcif_regmap_config);
+	rpc->regmap = devm_regmap_init(dev, NULL, rpc, &rpcif_regmap_config);
 	if (IS_ERR(rpc->regmap)) {
-		dev_err(&pdev->dev,
-			"failed to init regmap for rpcif, error %ld\n",
+		dev_err(dev, "failed to init regmap for rpcif, error %ld\n",
 			PTR_ERR(rpc->regmap));
 		return	PTR_ERR(rpc->regmap);
 	}
 
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
-	rpc->dirmap = devm_ioremap_resource(&pdev->dev, res);
+	rpc->dirmap = devm_ioremap_resource(dev, res);
 	if (IS_ERR(rpc->dirmap))
 		return PTR_ERR(rpc->dirmap);
 	rpc->size = resource_size(res);
 
 	rpc->type = (uintptr_t)of_device_get_match_data(dev);
-	rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
+	rpc->rstc = devm_reset_control_get_exclusive(dev, NULL);
 
 	return PTR_ERR_OR_ZERO(rpc->rstc);
 }
-- 
2.25.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux