[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <298009c43ad119703f564c0f1864743914b4beeb.1669213027.git.geert+renesas@glider.be>
Date: Wed, 23 Nov 2022 15:41:19 +0100
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Vignesh Raghavendra <vigneshr@...com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Mark Brown <broonie@...nel.org>
Cc: Philipp Zabel <p.zabel@...gutronix.de>,
Sergey Shtylyov <s.shtylyov@....ru>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-spi@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH v2 3/6] memory: renesas-rpc-if: Always use dev in rpcif_probe()
rpcif_probe() already has a "dev" variable 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@...der.be>
---
v2:
- Combination of the old "memory: renesas-rpc-if: Always use dev in
rpcif_sw_init()" and "memory: renesas-rpc-if: Add dev helper to
rpcif_probe()" after rebasing on top of the two fixes.
---
drivers/memory/renesas-rpc-if.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
index 42c5f9f10135b86a..83171242f9514c22 100644
--- a/drivers/memory/renesas-rpc-if.c
+++ b/drivers/memory/renesas-rpc-if.c
@@ -688,9 +688,9 @@ static int rpcif_probe(struct platform_device *pdev)
const char *name;
int ret;
- flash = of_get_next_child(pdev->dev.of_node, NULL);
+ flash = of_get_next_child(dev->of_node, NULL);
if (!flash) {
- dev_warn(&pdev->dev, "no flash node found\n");
+ dev_warn(dev, "no flash node found\n");
return -ENODEV;
}
@@ -700,12 +700,12 @@ static int rpcif_probe(struct platform_device *pdev)
name = "rpc-if-hyperflash";
} else {
of_node_put(flash);
- dev_warn(&pdev->dev, "unknown flash type\n");
+ dev_warn(dev, "unknown flash type\n");
return -ENODEV;
}
of_node_put(flash);
- rpc = devm_kzalloc(&pdev->dev, sizeof(*rpc), GFP_KERNEL);
+ rpc = devm_kzalloc(dev, sizeof(*rpc), GFP_KERNEL);
if (!rpc)
return -ENOMEM;
@@ -734,9 +734,9 @@ static int rpcif_probe(struct platform_device *pdev)
vdev = platform_device_alloc(name, pdev->id);
if (!vdev)
return -ENOMEM;
- vdev->dev.parent = &pdev->dev;
+ vdev->dev.parent = dev;
- rpc->dev = &pdev->dev;
+ rpc->dev = dev;
rpc->vdev = vdev;
platform_set_drvdata(pdev, rpc);
--
2.25.1
Powered by blists - more mailing lists