Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide: use dev_get_platdata()

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

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jingoo Han and committed by
David S. Miller
7b6b5612 6fcf0497

+4 -4
+1 -1
drivers/ide/gayle.c
··· 132 132 if (!request_mem_region(res->start, resource_size(res), "IDE")) 133 133 return -EBUSY; 134 134 135 - pdata = pdev->dev.platform_data; 135 + pdata = dev_get_platdata(&pdev->dev); 136 136 pr_info("ide: Gayle IDE controller (A%u style%s)\n", 137 137 pdata->explicit_ack ? 1200 : 4000, 138 138 ide_doubler ? ", IDE doubler" : "");
+1 -1
drivers/ide/ide_platform.c
··· 56 56 struct ide_hw hw, *hws[] = { &hw }; 57 57 struct ide_port_info d = platform_ide_port_info; 58 58 59 - pdata = pdev->dev.platform_data; 59 + pdata = dev_get_platdata(&pdev->dev); 60 60 61 61 /* get a pointer to the register memory */ 62 62 res_base = platform_get_resource(pdev, IORESOURCE_IO, 0);
+2 -2
drivers/ide/tx4938ide.c
··· 58 58 59 59 static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) 60 60 { 61 - struct tx4938ide_platform_info *pdata = hwif->dev->platform_data; 61 + struct tx4938ide_platform_info *pdata = dev_get_platdata(hwif->dev); 62 62 u8 safe = drive->pio_mode - XFER_PIO_0; 63 63 ide_drive_t *pair; 64 64 ··· 132 132 struct ide_hw hw, *hws[] = { &hw }; 133 133 struct ide_host *host; 134 134 struct resource *res; 135 - struct tx4938ide_platform_info *pdata = pdev->dev.platform_data; 135 + struct tx4938ide_platform_info *pdata = dev_get_platdata(&pdev->dev); 136 136 int irq, ret, i; 137 137 unsigned long mapbase, mapctl; 138 138 struct ide_port_info d = tx4938ide_port_info;