Skip to contentSkip to conversation

ide: use dev_get_platdata()

PATCH Applied Jingoo Han 2 participants 2 messages Jul 30, 2013 – Sep 5, 2013 libata

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 27/35 ide: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly.

---
 drivers/ide/gayle.c        |    2 +-
 drivers/ide/ide_platform.c |    2 +-
 drivers/ide/tx4938ide.c    |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/ide/gayle.c +1 -1
index 0a8440a..97a2f9d 100644
@@ -132,7 +132,7 @@ static int __init amiga_gayle_ide_probe(struct platform_device *pdev)
 	if (!request_mem_region(res->start, resource_size(res), "IDE"))
 		return -EBUSY;
 
-	pdata = pdev->dev.platform_data;
+	pdata = dev_get_platdata(&pdev->dev);
 	pr_info("ide: Gayle IDE controller (A%u style%s)\n",
 		pdata->explicit_ack ? 1200 : 4000,
 		ide_doubler ? ", IDE doubler" : "");
drivers/ide/ide_platform.c +1 -1
index ba4bfbe..a8b4b6a 100644
@@ -56,7 +56,7 @@ static int plat_ide_probe(struct platform_device *pdev)
 	struct ide_hw hw, *hws[] = { &hw };
 	struct ide_port_info d = platform_ide_port_info;
 
-	pdata = pdev->dev.platform_data;
+	pdata = dev_get_platdata(&pdev->dev);
 
 	/* get a pointer to the register memory */
 	res_base = platform_get_resource(pdev, IORESOURCE_IO, 0);
drivers/ide/tx4938ide.c +2 -2
index ede8575..68edd4f 100644
@@ -58,7 +58,7 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch,
 
 static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 {
-	struct tx4938ide_platform_info *pdata = hwif->dev->platform_data;
+	struct tx4938ide_platform_info *pdata = dev_get_platdata(hwif->dev);
 	u8 safe = drive->pio_mode - XFER_PIO_0;
 	ide_drive_t *pair;
 
@@ -132,7 +132,7 @@ static int __init tx4938ide_probe(struct platform_device *pdev)
 	struct ide_hw hw, *hws[] = { &hw };
 	struct ide_host *host;
 	struct resource *res;
-	struct tx4938ide_platform_info *pdata = pdev->dev.platform_data;
+	struct tx4938ide_platform_info *pdata = dev_get_platdata(&pdev->dev);
 	int irq, ret, i;
 	unsigned long mapbase, mapctl;
 	struct ide_port_info d = tx4938ide_port_info;
Signature · 1 line
1.7.10.4