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
@@ -57,7 +57,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
|
||||
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));
|
||||
@@ -190,7 +190,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
|
||||
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);
|
||||
@@ -218,7 +218,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
|
||||
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");
|
||||
@@ -291,7 +291,7 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)
|
||||
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) {
|
||||
/*
|
||||
@@ -363,7 +363,7 @@ static int ehci_fsl_setup(struct usb_hcd *hcd)
|
||||
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;
|
||||
|
||||
@@ -415,7 +415,7 @@ static int ehci_fsl_mpc512x_drv_suspend(struct device *dev)
|
||||
{
|
||||
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
|
||||
@@ -484,7 +484,7 @@ static int ehci_fsl_mpc512x_drv_resume(struct device *dev)
|
||||
{
|
||||
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",
|
||||
|
Reference in New Issue
Block a user