diff mbox series

[1/2] ata: sata_rcar: Provide a short-hand for &pdev->dev

Message ID 20180720122739.30056-2-geert+renesas@glider.be
State Not Applicable
Delegated to: David Miller
Headers show
Series ata: sata_rcar: Add rudimentary Runtime PM support | expand

Commit Message

Geert Uytterhoeven July 20, 2018, 12:27 p.m. UTC
No functional changes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/ata/sata_rcar.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Sergei Shtylyov July 20, 2018, 3:29 p.m. UTC | #1
Hello!

On 07/20/2018 03:27 PM, Geert Uytterhoeven wrote:

> No functional changes.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[...]

Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tejun Heo July 23, 2018, 3:19 p.m. UTC | #2
On Fri, Jul 20, 2018 at 02:27:38PM +0200, Geert Uytterhoeven wrote:
> No functional changes.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Applied 1-2 to libata/for-4.19.

Thanks.
Wolfram Sang July 25, 2018, 7:10 p.m. UTC | #3
On Fri, Jul 20, 2018 at 02:27:38PM +0200, Geert Uytterhoeven wrote:
> No functional changes.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

For the record, works fine with the newly added SATA support for M3-N:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
diff mbox series

Patch

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 6456e07db72a7ea4..f972c2c5ebd34aff 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -881,6 +881,7 @@  MODULE_DEVICE_TABLE(of, sata_rcar_match);
 
 static int sata_rcar_probe(struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;
 	struct ata_host *host;
 	struct sata_rcar_priv *priv;
 	struct resource *mem;
@@ -891,15 +892,14 @@  static int sata_rcar_probe(struct platform_device *pdev)
 	if (irq <= 0)
 		return -EINVAL;
 
-	priv = devm_kzalloc(&pdev->dev, sizeof(struct sata_rcar_priv),
-			   GFP_KERNEL);
+	priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
 
-	priv->type = (enum sata_rcar_type)of_device_get_match_data(&pdev->dev);
-	priv->clk = devm_clk_get(&pdev->dev, NULL);
+	priv->type = (enum sata_rcar_type)of_device_get_match_data(dev);
+	priv->clk = devm_clk_get(dev, NULL);
 	if (IS_ERR(priv->clk)) {
-		dev_err(&pdev->dev, "failed to get access to sata clock\n");
+		dev_err(dev, "failed to get access to sata clock\n");
 		return PTR_ERR(priv->clk);
 	}
 
@@ -907,9 +907,9 @@  static int sata_rcar_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	host = ata_host_alloc(&pdev->dev, 1);
+	host = ata_host_alloc(dev, 1);
 	if (!host) {
-		dev_err(&pdev->dev, "ata_host_alloc failed\n");
+		dev_err(dev, "ata_host_alloc failed\n");
 		ret = -ENOMEM;
 		goto cleanup;
 	}
@@ -917,7 +917,7 @@  static int sata_rcar_probe(struct platform_device *pdev)
 	host->private_data = priv;
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->base = devm_ioremap_resource(&pdev->dev, mem);
+	priv->base = devm_ioremap_resource(dev, mem);
 	if (IS_ERR(priv->base)) {
 		ret = PTR_ERR(priv->base);
 		goto cleanup;