/** * ufshcd_pltfrm_remove - remove platform driver routine * @pdev: pointer to platform device handle * * Returns 0 on success, non-zero value on failure */ static int ufshcd_pltfrm_remove(struct platform_device *pdev) { struct ufs_hba *hba = platform_get_drvdata(pdev); pm_runtime_get_sync(&(pdev)->dev); ufshcd_remove(hba); return 0; }
/** * ufshcd_pci_remove - de-allocate PCI/SCSI host and host memory space * data structure memory * @pdev - pointer to PCI handle */ static void ufshcd_pci_remove(struct pci_dev *pdev) { struct ufs_hba *hba = pci_get_drvdata(pdev); pm_runtime_forbid(&pdev->dev); pm_runtime_get_noresume(&pdev->dev); ufshcd_remove(hba); pci_set_drvdata(pdev, NULL); }
/** * ufshcd_pci_remove - de-allocate PCI/SCSI host and host memory space * data structure memory * @pdev - pointer to PCI handle */ static void ufshcd_pci_remove(struct pci_dev *pdev) { struct ufs_hba *hba = pci_get_drvdata(pdev); disable_irq(pdev->irq); ufshcd_remove(hba); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); pci_clear_master(pdev); pci_disable_device(pdev); }