pr_debug("initializing FSL-SOC USB Controller\n");
 
        /* Need platform data for setup */
-       pdata = (struct fsl_usb2_platform_data *)pdev->dev.platform_data;
+       pdata = (struct fsl_usb2_platform_data *)dev_get_platdata(&pdev->dev);
        if (!pdata) {
                dev_err(&pdev->dev,
                        "No platform data for %s.\n", dev_name(&pdev->dev));
 static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
                               struct platform_device *pdev)
 {
-       struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
+       struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev);
 
        if (!IS_ERR_OR_NULL(hcd->phy)) {
                otg_set_host(hcd->phy->otg, NULL);
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
        void __iomem *non_ehci = hcd->regs;
        struct device *dev = hcd->self.controller;
-       struct fsl_usb2_platform_data *pdata = dev->platform_data;
+       struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev);
 
        if (pdata->controller_ver < 0) {
                dev_warn(hcd->self.controller, "Could not get controller version\n");
        struct fsl_usb2_platform_data *pdata;
        void __iomem *non_ehci = hcd->regs;
 
-       pdata = hcd->self.controller->platform_data;
+       pdata = dev_get_platdata(hcd->self.controller);
 
        if (pdata->have_sysif_regs) {
                /*
        struct device *dev;
 
        dev = hcd->self.controller;
-       pdata = hcd->self.controller->platform_data;
+       pdata = dev_get_platdata(hcd->self.controller);
        ehci->big_endian_desc = pdata->big_endian_desc;
        ehci->big_endian_mmio = pdata->big_endian_mmio;
 
 {
        struct usb_hcd *hcd = dev_get_drvdata(dev);
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
-       struct fsl_usb2_platform_data *pdata = dev->platform_data;
+       struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev);
        u32 tmp;
 
 #ifdef DEBUG
 {
        struct usb_hcd *hcd = dev_get_drvdata(dev);
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
-       struct fsl_usb2_platform_data *pdata = dev->platform_data;
+       struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev);
        u32 tmp;
 
        dev_dbg(dev, "suspend=%d already_suspended=%d\n",
 
 
 static int mv_ehci_probe(struct platform_device *pdev)
 {
-       struct mv_usb_platform_data *pdata = pdev->dev.platform_data;
+       struct mv_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct usb_hcd *hcd;
        struct ehci_hcd *ehci;
        struct ehci_hcd_mv *ehci_mv;
 
 
 static int ehci_mxc_drv_probe(struct platform_device *pdev)
 {
-       struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data;
+       struct mxc_usbh_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct usb_hcd *hcd;
        struct resource *res;
        int irq, ret;
 
 static int ehci_mxc_drv_remove(struct platform_device *pdev)
 {
-       struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data;
+       struct mxc_usbh_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
        struct ehci_mxc_priv *priv = (struct ehci_mxc_priv *) ehci->priv;
 
 static int ehci_hcd_omap_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
-       struct usbhs_omap_platform_data *pdata = dev->platform_data;
+       struct usbhs_omap_platform_data *pdata = dev_get_platdata(dev);
        struct resource *res;
        struct usb_hcd  *hcd;
        void __iomem *regs;
 
        /* For DT boot, get platform data from parent. i.e. usbhshost */
        if (dev->of_node) {
-               pdata = dev->parent->platform_data;
+               pdata = dev_get_platdata(dev->parent);
                dev->platform_data = pdata;
        }
 
 
 
 static int ehci_orion_drv_probe(struct platform_device *pdev)
 {
-       struct orion_ehci_data *pd = pdev->dev.platform_data;
+       struct orion_ehci_data *pd = dev_get_platdata(&pdev->dev);
        const struct mbus_dram_target_info *dram;
        struct resource *res;
        struct usb_hcd *hcd;
 
 static int ehci_platform_reset(struct usb_hcd *hcd)
 {
        struct platform_device *pdev = to_platform_device(hcd->self.controller);
-       struct usb_ehci_pdata *pdata = pdev->dev.platform_data;
+       struct usb_ehci_pdata *pdata = dev_get_platdata(&pdev->dev);
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
        int retval;
 
         * use reasonable defaults so platforms don't have to provide these.
         * with DT probing on ARM, none of these are set.
         */
-       if (!dev->dev.platform_data)
+       if (!dev_get_platdata(&dev->dev))
                dev->dev.platform_data = &ehci_platform_defaults;
        if (!dev->dev.dma_mask)
                dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
        if (!dev->dev.coherent_dma_mask)
                dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
-       pdata = dev->dev.platform_data;
+       pdata = dev_get_platdata(&dev->dev);
 
        irq = platform_get_irq(dev, 0);
        if (irq < 0) {
 static int ehci_platform_remove(struct platform_device *dev)
 {
        struct usb_hcd *hcd = platform_get_drvdata(dev);
-       struct usb_ehci_pdata *pdata = dev->dev.platform_data;
+       struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev);
 
        usb_remove_hcd(hcd);
        usb_put_hcd(hcd);
 static int ehci_platform_suspend(struct device *dev)
 {
        struct usb_hcd *hcd = dev_get_drvdata(dev);
-       struct usb_ehci_pdata *pdata = dev->platform_data;
+       struct usb_ehci_pdata *pdata = dev_get_platdata(dev);
        struct platform_device *pdev =
                container_of(dev, struct platform_device, dev);
        bool do_wakeup = device_may_wakeup(dev);
 static int ehci_platform_resume(struct device *dev)
 {
        struct usb_hcd *hcd = dev_get_drvdata(dev);
-       struct usb_ehci_pdata *pdata = dev->platform_data;
+       struct usb_ehci_pdata *pdata = dev_get_platdata(dev);
        struct platform_device *pdev =
                container_of(dev, struct platform_device, dev);
 
 
 
 static int s5p_ehci_probe(struct platform_device *pdev)
 {
-       struct s5p_ehci_platdata *pdata = pdev->dev.platform_data;
+       struct s5p_ehci_platdata *pdata = dev_get_platdata(&pdev->dev);
        struct s5p_ehci_hcd *s5p_ehci;
        struct usb_hcd *hcd;
        struct ehci_hcd *ehci;
 
                goto fail_create_hcd;
        }
 
-       pdata = pdev->dev.platform_data;
+       pdata = dev_get_platdata(&pdev->dev);
 
        /* initialize hcd */
        hcd = usb_create_hcd(&ehci_sh_hc_driver, &pdev->dev,
 
        struct device_node *np_phy;
        struct usb_phy *u_phy;
 
-       pdata = pdev->dev.platform_data;
+       pdata = dev_get_platdata(&pdev->dev);
        if (!pdata) {
                dev_err(&pdev->dev, "Platform data missing\n");
                return -EINVAL;
 
 {
        struct usb_hcd *hcd;
        struct ehci_hcd *ehci;
-       struct tilegx_usb_platform_data *pdata = pdev->dev.platform_data;
+       struct tilegx_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
        pte_t pte = { 0 };
        int my_cpu = smp_processor_id();
        int ret;
 static int ehci_hcd_tilegx_drv_remove(struct platform_device *pdev)
 {
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
-       struct tilegx_usb_platform_data *pdata = pdev->dev.platform_data;
+       struct tilegx_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
 
        usb_remove_hcd(hcd);
        usb_put_hcd(hcd);
 
 
 int fsl_usb2_mpc5121_init(struct platform_device *pdev)
 {
-       struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
+       struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct clk *clk;
        char clk_name[10];
        int base, clk_num;
 
 static void fsl_usb2_mpc5121_exit(struct platform_device *pdev)
 {
-       struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
+       struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev);
 
        pdata->regs = NULL;
 
 
        imx21 = hcd_to_imx21(hcd);
        imx21->hcd = hcd;
        imx21->dev = &pdev->dev;
-       imx21->pdata = pdev->dev.platform_data;
+       imx21->pdata = dev_get_platdata(&pdev->dev);
        if (!imx21->pdata)
                imx21->pdata = &default_pdata;
 
 
        isp116x->addr_reg = addr_reg;
        spin_lock_init(&isp116x->lock);
        INIT_LIST_HEAD(&isp116x->async);
-       isp116x->board = pdev->dev.platform_data;
+       isp116x->board = dev_get_platdata(&pdev->dev);
 
        if (!isp116x->board) {
                ERR("Platform data structure not initialized\n");
 
        INIT_LIST_HEAD(&isp1362_hcd->periodic);
        INIT_LIST_HEAD(&isp1362_hcd->isoc);
        INIT_LIST_HEAD(&isp1362_hcd->remove_list);
-       isp1362_hcd->board = pdev->dev.platform_data;
+       isp1362_hcd->board = dev_get_platdata(&pdev->dev);
 #if USE_PLATFORM_DELAY
        if (!isp1362_hcd->board->delay) {
                dev_err(hcd->self.controller, "No platform delay function given\n");
 
        struct resource *mem_res;
        struct resource *irq_res;
        resource_size_t mem_size;
-       struct isp1760_platform_data *priv = pdev->dev.platform_data;
+       struct isp1760_platform_data *priv = dev_get_platdata(&pdev->dev);
        unsigned int devflags = 0;
        unsigned long irqflags = IRQF_SHARED;
 
 
 static int
 ohci_at91_reset (struct usb_hcd *hcd)
 {
-       struct at91_usbh_data   *board = hcd->self.controller->platform_data;
+       struct at91_usbh_data   *board = dev_get_platdata(hcd->self.controller);
        struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
        int                     ret;
 
  */
 static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf)
 {
-       struct at91_usbh_data *pdata = hcd->self.controller->platform_data;
+       struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller);
        int length = ohci_hub_status_data(hcd, buf);
        int port;
 
 static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                                 u16 wIndex, char *buf, u16 wLength)
 {
-       struct at91_usbh_data *pdata = hcd->self.controller->platform_data;
+       struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller);
        struct usb_hub_descriptor *desc;
        int ret = -EINVAL;
        u32 *data = (u32 *)buf;
 static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data)
 {
        struct platform_device *pdev = data;
-       struct at91_usbh_data *pdata = pdev->dev.platform_data;
+       struct at91_usbh_data *pdata = dev_get_platdata(&pdev->dev);
        int val, gpio, port;
 
        /* From the GPIO notifying the over-current situation, find
        if (ret)
                return ret;
 
-       pdata = pdev->dev.platform_data;
+       pdata = dev_get_platdata(&pdev->dev);
 
        if (pdata) {
                at91_for_each_port(i) {
 
 static int ohci_hcd_at91_drv_remove(struct platform_device *pdev)
 {
-       struct at91_usbh_data   *pdata = pdev->dev.platform_data;
+       struct at91_usbh_data   *pdata = dev_get_platdata(&pdev->dev);
        int                     i;
 
        if (pdata) {
 
 static int ohci_da8xx_init(struct usb_hcd *hcd)
 {
        struct device *dev              = hcd->self.controller;
-       struct da8xx_ohci_root_hub *hub = dev->platform_data;
+       struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
        struct ohci_hcd *ohci           = hcd_to_ohci(hcd);
        int result;
        u32 rh_a;
                                  u16 wIndex, char *buf, u16 wLength)
 {
        struct device *dev              = hcd->self.controller;
-       struct da8xx_ohci_root_hub *hub = dev->platform_data;
+       struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
        int temp;
 
        switch (typeReq) {
 static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
                               struct platform_device *pdev)
 {
-       struct da8xx_ohci_root_hub *hub = pdev->dev.platform_data;
+       struct da8xx_ohci_root_hub *hub = dev_get_platdata(&pdev->dev);
        struct usb_hcd  *hcd;
        struct resource *mem;
        int error, irq;
 static inline void
 usb_hcd_da8xx_remove(struct usb_hcd *hcd, struct platform_device *pdev)
 {
-       struct da8xx_ohci_root_hub *hub = pdev->dev.platform_data;
+       struct da8xx_ohci_root_hub *hub = dev_get_platdata(&pdev->dev);
 
        hub->ocic_notify(NULL);
        usb_remove_hcd(hcd);
 
 
 static int exynos_ohci_probe(struct platform_device *pdev)
 {
-       struct exynos4_ohci_platdata *pdata = pdev->dev.platform_data;
+       struct exynos4_ohci_platdata *pdata = dev_get_platdata(&pdev->dev);
        struct exynos_ohci_hcd *exynos_ohci;
        struct usb_hcd *hcd;
        struct ohci_hcd *ohci;
 
 static int ohci_omap_init(struct usb_hcd *hcd)
 {
        struct ohci_hcd         *ohci = hcd_to_ohci(hcd);
-       struct omap_usb_config  *config = hcd->self.controller->platform_data;
+       struct omap_usb_config  *config = dev_get_platdata(hcd->self.controller);
        int                     need_transceiver = (config->otg != 0);
        int                     ret;
 
 
        if (!host_enabled)
                return 0;
-       config = hcd->self.controller->platform_data;
+       config = dev_get_platdata(hcd->self.controller);
        if (config->otg || config->rwc) {
                ohci->hc_control = OHCI_CTRL_RWC;
                writel(OHCI_CTRL_RWC, &ohci->regs->control);
 
 static int ohci_platform_reset(struct usb_hcd *hcd)
 {
        struct platform_device *pdev = to_platform_device(hcd->self.controller);
-       struct usb_ohci_pdata *pdata = pdev->dev.platform_data;
+       struct usb_ohci_pdata *pdata = dev_get_platdata(&pdev->dev);
        struct ohci_hcd *ohci = hcd_to_ohci(hcd);
 
        if (pdata->big_endian_desc)
 {
        struct usb_hcd *hcd;
        struct resource *res_mem;
-       struct usb_ohci_pdata *pdata = dev->dev.platform_data;
+       struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev);
        int irq;
        int err = -ENOMEM;
 
 static int ohci_platform_remove(struct platform_device *dev)
 {
        struct usb_hcd *hcd = platform_get_drvdata(dev);
-       struct usb_ohci_pdata *pdata = dev->dev.platform_data;
+       struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev);
 
        usb_remove_hcd(hcd);
        usb_put_hcd(hcd);
 
 static int ohci_platform_suspend(struct device *dev)
 {
-       struct usb_ohci_pdata *pdata = dev->platform_data;
+       struct usb_ohci_pdata *pdata = dev_get_platdata(dev);
        struct platform_device *pdev =
                container_of(dev, struct platform_device, dev);
 
 static int ohci_platform_resume(struct device *dev)
 {
        struct usb_hcd *hcd = dev_get_drvdata(dev);
-       struct usb_ohci_pdata *pdata = dev->platform_data;
+       struct usb_ohci_pdata *pdata = dev_get_platdata(dev);
        struct platform_device *pdev =
                container_of(dev, struct platform_device, dev);
 
 
        struct pxaohci_platform_data *inf;
        uint32_t uhchr;
 
-       inf = dev->platform_data;
+       inf = dev_get_platdata(dev);
 
        clk_prepare_enable(ohci->clk);
 
        struct pxaohci_platform_data *inf;
        uint32_t uhccoms;
 
-       inf = dev->platform_data;
+       inf = dev_get_platdata(dev);
 
        if (cpu_is_pxa3xx())
                pxa3xx_u2d_stop_hc(&ohci_to_hcd(&ohci->ohci)->self);
        if (retval)
                return retval;
 
-       inf = pdev->dev.platform_data;
+       inf = dev_get_platdata(&pdev->dev);
 
        if (!inf)
                return -ENODEV;
 {
        struct usb_hcd *hcd = dev_get_drvdata(dev);
        struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd);
-       struct pxaohci_platform_data *inf = dev->platform_data;
+       struct pxaohci_platform_data *inf = dev_get_platdata(dev);
        int status;
 
        if (time_before(jiffies, ohci->ohci.next_statechange))
 
 
 static struct s3c2410_hcd_info *to_s3c2410_info(struct usb_hcd *hcd)
 {
-       return hcd->self.controller->platform_data;
+       return dev_get_platdata(hcd->self.controller);
 }
 
 static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd)
 {
-       struct s3c2410_hcd_info *info = dev->dev.platform_data;
+       struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev);
 
        dev_dbg(&dev->dev, "s3c2410_start_hc:\n");
 
 
 static void s3c2410_stop_hc(struct platform_device *dev)
 {
-       struct s3c2410_hcd_info *info = dev->dev.platform_data;
+       struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev);
 
        dev_dbg(&dev->dev, "s3c2410_stop_hc:\n");
 
                                  struct platform_device *dev)
 {
        struct usb_hcd *hcd = NULL;
+       struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev);
        int retval;
 
-       s3c2410_usb_set_power(dev->dev.platform_data, 1, 1);
-       s3c2410_usb_set_power(dev->dev.platform_data, 2, 1);
+       s3c2410_usb_set_power(info, 1, 1);
+       s3c2410_usb_set_power(info, 2, 1);
 
        hcd = usb_create_hcd(driver, &dev->dev, "s3c24xx");
        if (hcd == NULL)
 
 static int ohci_hcd_tilegx_drv_probe(struct platform_device *pdev)
 {
        struct usb_hcd *hcd;
-       struct tilegx_usb_platform_data *pdata = pdev->dev.platform_data;
+       struct tilegx_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
        pte_t pte = { 0 };
        int my_cpu = smp_processor_id();
        int ret;
 static int ohci_hcd_tilegx_drv_remove(struct platform_device *pdev)
 {
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
-       struct tilegx_usb_platform_data* pdata = pdev->dev.platform_data;
+       struct tilegx_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
 
        usb_remove_hcd(hcd);
        usb_put_hcd(hcd);
 
        r8a66597 = hcd_to_r8a66597(hcd);
        memset(r8a66597, 0, sizeof(struct r8a66597));
        dev_set_drvdata(&pdev->dev, r8a66597);
-       r8a66597->pdata = pdev->dev.platform_data;
+       r8a66597->pdata = dev_get_platdata(&pdev->dev);
        r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW;
 
        if (r8a66597->pdata->on_chip) {
 
 
        spin_lock_init(&sl811->lock);
        INIT_LIST_HEAD(&sl811->async);
-       sl811->board = dev->dev.platform_data;
+       sl811->board = dev_get_platdata(&dev->dev);
        init_timer(&sl811->timer);
        sl811->timer.function = sl811h_timer;
        sl811->timer.data = (unsigned long) sl811;
 
                struct platform_device *pdev =
                        to_platform_device(hcd->self.controller);
                u16 vendor = ((struct u132_platform_data *)
-                       (pdev->dev.platform_data))->vendor;
+                       dev_get_platdata(&pdev->dev))->vendor;
                u16 device = ((struct u132_platform_data *)
-                       (pdev->dev.platform_data))->device;
+                       dev_get_platdata(&pdev->dev))->device;
                mutex_lock(&u132->sw_lock);
                msleep(10);
                if (vendor == PCI_VENDOR_ID_AMD && device == 0x740c) {
        int addrs = MAX_U132_ADDRS;
        int udevs = MAX_U132_UDEVS;
        int endps = MAX_U132_ENDPS;
-       u132->board = pdev->dev.platform_data;
+       u132->board = dev_get_platdata(&pdev->dev);
        u132->platform_dev = pdev;
        u132->power = 0;
        u132->reset = 0;