static int ehci_hcd_grlib_remove(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
-
- dev_set_drvdata(&op->dev, NULL);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
dev_dbg(&op->dev, "stopping GRLIB GRUSBHC EHCI USB Controller\n");
static void ehci_hcd_grlib_shutdown(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
if (hcd->driver->shutdown)
hcd->driver->shutdown(hcd);
static int ehci_hcd_ppc_of_remove(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
struct device_node *np;
struct resource res;
- dev_set_drvdata(&op->dev, NULL);
-
dev_dbg(&op->dev, "stopping PPC-OF USB Controller\n");
usb_remove_hcd(hcd);
static void ehci_hcd_ppc_of_shutdown(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
if (hcd->driver->shutdown)
hcd->driver->shutdown(hcd);
*/
static int ehci_hcd_xilinx_of_remove(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
- dev_set_drvdata(&op->dev, NULL);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
dev_dbg(&op->dev, "stopping XILINX-OF USB Controller\n");
*/
static void ehci_hcd_xilinx_of_shutdown(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
if (hcd->driver->shutdown)
hcd->driver->shutdown(hcd);
goto free_gpio;
}
- dev_set_drvdata(&dev->dev, drvdata);
+ platform_set_drvdata(dev, drvdata);
return ret;
free_gpio:
static int of_isp1760_remove(struct platform_device *dev)
{
- struct isp1760 *drvdata = dev_get_drvdata(&dev->dev);
-
- dev_set_drvdata(&dev->dev, NULL);
+ struct isp1760 *drvdata = platform_get_drvdata(dev);
usb_remove_hcd(drvdata->hcd);
iounmap(drvdata->hcd->regs);
irqflags, -ENOENT,
&pdev->dev, dev_name(&pdev->dev), devflags);
- dev_set_drvdata(&pdev->dev, hcd);
+ platform_set_drvdata(pdev, hcd);
if (IS_ERR(hcd)) {
pr_warning("isp1760: Failed to register the HCD device\n");
{
struct resource *mem_res;
resource_size_t mem_size;
- struct usb_hcd *hcd = dev_get_drvdata(&pdev->dev);
+ struct usb_hcd *hcd = platform_get_drvdata(pdev);
usb_remove_hcd(hcd);
static int ohci_hcd_ppc_of_remove(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
- dev_set_drvdata(&op->dev, NULL);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
dev_dbg(&op->dev, "stopping PPC-OF USB Controller\n");
static void ohci_hcd_ppc_of_shutdown(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
if (hcd->driver->shutdown)
hcd->driver->shutdown(hcd);
static int uhci_hcd_grlib_remove(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
-
- dev_set_drvdata(&op->dev, NULL);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
dev_dbg(&op->dev, "stopping GRLIB GRUSBHC UHCI USB Controller\n");
*/
static void uhci_hcd_grlib_shutdown(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
uhci_hc_died(hcd_to_uhci(hcd));
}
*/
static void uhci_hcd_platform_shutdown(struct platform_device *op)
{
- struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
+ struct usb_hcd *hcd = platform_get_drvdata(op);
uhci_hc_died(hcd_to_uhci(hcd));
}
goto unmap_registers;
/* USB 2.0 roothub is stored in the platform_device now. */
- hcd = dev_get_drvdata(&pdev->dev);
+ hcd = platform_get_drvdata(pdev);
xhci = hcd_to_xhci(hcd);
xhci->shared_hcd = usb_create_shared_hcd(driver, &pdev->dev,
dev_name(&pdev->dev), hcd);