diff mbox

[1/6] ata: bf54x: cut drvdata assignment

Message ID 20170530094644.15566-1-linus.walleij@linaro.org
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Linus Walleij May 30, 2017, 9:46 a.m. UTC
ata_host_alloc_pinfo() assigns the host pointer to the
struct device * drvdata, do not assign it a second time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/ata/pata_bf54x.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Sergei Shtylyov May 30, 2017, 12:22 p.m. UTC | #1
Hello!

On 05/30/2017 12:46 PM, Linus Walleij wrote:

> ata_host_alloc_pinfo() assigns the host pointer to the
> struct device * drvdata, do not assign it a second time.

    It's actually driver_data, not drvdata.
    Personally, I now prefer expressing the *struct* fields the C++ way:
device::driver_data. :-)

>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

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 May 30, 2017, 3:55 p.m. UTC | #2
On Tue, May 30, 2017 at 11:46:39AM +0200, Linus Walleij wrote:
> ata_host_alloc_pinfo() assigns the host pointer to the
> struct device * drvdata, do not assign it a second time.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Applied 1-6 to libata/for-4.13.

Thanks.
diff mbox

Patch

diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 9c5780a7e1b9..0e55a8da2748 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1597,8 +1597,6 @@  static int bfin_atapi_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	platform_set_drvdata(pdev, host);
-
 	return 0;
 }