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
@@ -95,7 +95,7 @@ static const struct hc_driver ohci_tilegx_hc_driver = {
|
||||
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;
|
||||
@@ -175,7 +175,7 @@ err_hcd:
|
||||
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);
|
||||
|
Reference in New Issue
Block a user