mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ata: remove deprecated struct ahci_platform_data
The last user of the deprecated struct ahci_platform_data has been cleaned up recently (SPEAr1340 got a proper PHY driver). Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
This commit is contained in:
parent
88ec63d6f8
commit
515d9b2c03
3 changed files with 1 additions and 53 deletions
|
|
@ -32,7 +32,6 @@ static const struct ata_port_info ahci_port_info = {
|
|||
static int ahci_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct ahci_platform_data *pdata = dev_get_platdata(dev);
|
||||
struct ahci_host_priv *hpriv;
|
||||
int rc;
|
||||
|
||||
|
|
@ -44,29 +43,14 @@ static int ahci_probe(struct platform_device *pdev)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
/*
|
||||
* Some platforms might need to prepare for mmio region access,
|
||||
* which could be done in the following init call. So, the mmio
|
||||
* region shouldn't be accessed before init (if provided) has
|
||||
* returned successfully.
|
||||
*/
|
||||
if (pdata && pdata->init) {
|
||||
rc = pdata->init(dev, hpriv->mmio);
|
||||
if (rc)
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
|
||||
hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
|
||||
|
||||
rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info);
|
||||
if (rc)
|
||||
goto pdata_exit;
|
||||
goto disable_resources;
|
||||
|
||||
return 0;
|
||||
pdata_exit:
|
||||
if (pdata && pdata->exit)
|
||||
pdata->exit(dev);
|
||||
disable_resources:
|
||||
ahci_platform_disable_resources(hpriv);
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -502,13 +502,8 @@ EXPORT_SYMBOL_GPL(ahci_platform_init_host);
|
|||
|
||||
static void ahci_host_stop(struct ata_host *host)
|
||||
{
|
||||
struct device *dev = host->dev;
|
||||
struct ahci_platform_data *pdata = dev_get_platdata(dev);
|
||||
struct ahci_host_priv *hpriv = host->private_data;
|
||||
|
||||
if (pdata && pdata->exit)
|
||||
pdata->exit(dev);
|
||||
|
||||
ahci_platform_disable_resources(hpriv);
|
||||
}
|
||||
|
||||
|
|
@ -592,7 +587,6 @@ EXPORT_SYMBOL_GPL(ahci_platform_resume_host);
|
|||
*/
|
||||
int ahci_platform_suspend(struct device *dev)
|
||||
{
|
||||
struct ahci_platform_data *pdata = dev_get_platdata(dev);
|
||||
struct ata_host *host = dev_get_drvdata(dev);
|
||||
struct ahci_host_priv *hpriv = host->private_data;
|
||||
int rc;
|
||||
|
|
@ -601,19 +595,9 @@ int ahci_platform_suspend(struct device *dev)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (pdata && pdata->suspend) {
|
||||
rc = pdata->suspend(dev);
|
||||
if (rc)
|
||||
goto resume_host;
|
||||
}
|
||||
|
||||
ahci_platform_disable_resources(hpriv);
|
||||
|
||||
return 0;
|
||||
|
||||
resume_host:
|
||||
ahci_platform_resume_host(dev);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ahci_platform_suspend);
|
||||
|
||||
|
|
@ -629,7 +613,6 @@ EXPORT_SYMBOL_GPL(ahci_platform_suspend);
|
|||
*/
|
||||
int ahci_platform_resume(struct device *dev)
|
||||
{
|
||||
struct ahci_platform_data *pdata = dev_get_platdata(dev);
|
||||
struct ata_host *host = dev_get_drvdata(dev);
|
||||
struct ahci_host_priv *hpriv = host->private_data;
|
||||
int rc;
|
||||
|
|
@ -638,12 +621,6 @@ int ahci_platform_resume(struct device *dev)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (pdata && pdata->resume) {
|
||||
rc = pdata->resume(dev);
|
||||
if (rc)
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
rc = ahci_platform_resume_host(dev);
|
||||
if (rc)
|
||||
goto disable_resources;
|
||||
|
|
|
|||
Loading…
Reference in a new issue