diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2014-03-14 19:21:59 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-03-14 14:26:29 -0400 |
commit | b032378b4c3ffba86d2c78699b385ae646397938 (patch) | |
tree | 3854cd87095d57cecad971153859c4003789be65 /drivers/ata/ahci_st.c | |
parent | 33081b34681742add8d8c1e49fc93045415e5a18 (diff) |
ata: ahci_st: remove deprecated struct ahci_platform_data usage
struct ahci_platform_data is deprecated (please see comments in
<linux/ahci_platform.h> for details). Convert ahci_st driver to
use custom ->host_stop method instead.
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci_st.c')
-rw-r--r-- | drivers/ata/ahci_st.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c index e1aa5447a400..633222226c19 100644 --- a/drivers/ata/ahci_st.c +++ b/drivers/ata/ahci_st.c @@ -87,10 +87,11 @@ static int st_ahci_deassert_resets(struct device *dev) return 0; } -static void st_ahci_exit(struct device *dev) +static void st_ahci_host_stop(struct ata_host *host) { + struct ahci_host_priv *hpriv = host->private_data; + struct device *dev = host->dev; struct st_ahci_drv_data *drv_data = dev_get_drvdata(dev); - struct ahci_host_priv *hpriv = drv_data->hpriv; int err; if (drv_data->pwr) { @@ -127,17 +128,21 @@ static int st_ahci_probe_resets(struct platform_device *pdev) return st_ahci_deassert_resets(&pdev->dev); } +static struct ata_port_operations st_ahci_port_ops = { + .inherits = &ahci_platform_ops, + .host_stop = st_ahci_host_stop, +}; + static const struct ata_port_info st_ahci_port_info = { .flags = AHCI_FLAG_COMMON, .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, - .port_ops = &ahci_platform_ops, + .port_ops = &st_ahci_port_ops, }; static int st_ahci_probe(struct platform_device *pdev) { struct st_ahci_drv_data *drv_data; - struct ahci_platform_data *pdata; struct ahci_host_priv *hpriv; int err; @@ -147,13 +152,6 @@ static int st_ahci_probe(struct platform_device *pdev) platform_set_drvdata(pdev, drv_data); - pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) - return -ENOMEM; - - pdata->exit = st_ahci_exit; - pdev->dev.platform_data = pdata; - hpriv = ahci_platform_get_resources(pdev); if (IS_ERR(hpriv)) return PTR_ERR(hpriv); |