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" : "");
 
        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);
 
 
 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;
 
        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;