Skip to content

Commit 7b6b561

Browse files
Jingoo Handavem330
authored andcommitted
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>
1 parent 6fcf049 commit 7b6b561

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/ide/gayle.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static int __init amiga_gayle_ide_probe(struct platform_device *pdev)
132132
if (!request_mem_region(res->start, resource_size(res), "IDE"))
133133
return -EBUSY;
134134

135-
pdata = pdev->dev.platform_data;
135+
pdata = dev_get_platdata(&pdev->dev);
136136
pr_info("ide: Gayle IDE controller (A%u style%s)\n",
137137
pdata->explicit_ack ? 1200 : 4000,
138138
ide_doubler ? ", IDE doubler" : "");

‎drivers/ide/ide_platform.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static int plat_ide_probe(struct platform_device *pdev)
5656
struct ide_hw hw, *hws[] = { &hw };
5757
struct ide_port_info d = platform_ide_port_info;
5858

59-
pdata = pdev->dev.platform_data;
59+
pdata = dev_get_platdata(&pdev->dev);
6060

6161
/* get a pointer to the register memory */
6262
res_base = platform_get_resource(pdev, IORESOURCE_IO, 0);

‎drivers/ide/tx4938ide.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch,
5858

5959
static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
6060
{
61-
struct tx4938ide_platform_info *pdata = hwif->dev->platform_data;
61+
struct tx4938ide_platform_info *pdata = dev_get_platdata(hwif->dev);
6262
u8 safe = drive->pio_mode - XFER_PIO_0;
6363
ide_drive_t *pair;
6464

@@ -132,7 +132,7 @@ static int __init tx4938ide_probe(struct platform_device *pdev)
132132
struct ide_hw hw, *hws[] = { &hw };
133133
struct ide_host *host;
134134
struct resource *res;
135-
struct tx4938ide_platform_info *pdata = pdev->dev.platform_data;
135+
struct tx4938ide_platform_info *pdata = dev_get_platdata(&pdev->dev);
136136
int irq, ret, i;
137137
unsigned long mapbase, mapctl;
138138
struct ide_port_info d = tx4938ide_port_info;

0 commit comments

Comments
 (0)