struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
struct fsl_usb2_platform_data *pdata;
pdata = hcd->self.controller->platform_data;
- if (pdata->platform_rh_resume)
+ if (pdata && pdata->platform_rh_resume)
pdata->platform_rh_resume(pdata);
}
#endif
struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
struct fsl_usb2_platform_data *pdata;
pdata = hcd->self.controller->platform_data;
- if (pdata->platform_rh_resume)
+ if (pdata && pdata->platform_rh_resume)
pdata->platform_rh_resume(pdata);
}
#endif
pdata = (struct fsl_usb2_platform_data *)dev->platform_data;
if (dev->parent && (hdev->level == 0) && dev->type) {
- if (port1 == 1 && pdata->init)
+ if (port1 == 1 && pdata && pdata->init)
pdata->init(NULL);
}
if ((port1 == 1) && (hdev->level == 0)) {
/* Must clear HOSTDISCONDETECT when port connect change happen*/
- if (pdata->platform_set_disconnect_det)
+ if (pdata && pdata->platform_set_disconnect_det)
pdata->platform_set_disconnect_det(pdata, 0);
}
{
struct fsl_usb2_platform_data *pdata;
pdata = hcd->self.controller->platform_data;
- if (pdata->platform_rh_resume)
+ if (pdata && pdata->platform_rh_resume)
pdata->platform_rh_resume(pdata);
}
#endif
{
struct fsl_usb2_platform_data *pdata;
pdata = hcd->self.controller->platform_data;
- if (pdata->platform_rh_suspend)
+ if (pdata && pdata->platform_rh_suspend)
pdata->platform_rh_suspend(pdata);
}
#endif