USB: host: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
4fae6f0fa8
commit
d4f09e28d7
@@ -100,7 +100,7 @@ static const struct ehci_driver_overrides ehci_omap_overrides __initdata = {
|
||||
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;
|
||||
@@ -119,7 +119,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user