diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2014-03-14 14:21:59 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-03-14 14:26:29 -0400 |
commit | b032378b4c3ffba86d2c78699b385ae646397938 (patch) | |
tree | 3854cd87095d57cecad971153859c4003789be65 | |
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>
-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) | |||
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||
90 | static void st_ahci_exit(struct device *dev) | 90 | static void st_ahci_host_stop(struct ata_host *host) |
91 | { | 91 | { |
92 | struct ahci_host_priv *hpriv = host->private_data; | ||
93 | struct device *dev = host->dev; | ||
92 | struct st_ahci_drv_data *drv_data = dev_get_drvdata(dev); | 94 | struct st_ahci_drv_data *drv_data = dev_get_drvdata(dev); |
93 | struct ahci_host_priv *hpriv = drv_data->hpriv; | ||
94 | int err; | 95 | int err; |
95 | 96 | ||
96 | if (drv_data->pwr) { | 97 | if (drv_data->pwr) { |
@@ -127,17 +128,21 @@ static int st_ahci_probe_resets(struct platform_device *pdev) | |||
127 | return st_ahci_deassert_resets(&pdev->dev); | 128 | return st_ahci_deassert_resets(&pdev->dev); |
128 | } | 129 | } |
129 | 130 | ||
131 | static struct ata_port_operations st_ahci_port_ops = { | ||
132 | .inherits = &ahci_platform_ops, | ||
133 | .host_stop = st_ahci_host_stop, | ||
134 | }; | ||
135 | |||
130 | static const struct ata_port_info st_ahci_port_info = { | 136 | static const struct ata_port_info st_ahci_port_info = { |
131 | .flags = AHCI_FLAG_COMMON, | 137 | .flags = AHCI_FLAG_COMMON, |
132 | .pio_mask = ATA_PIO4, | 138 | .pio_mask = ATA_PIO4, |
133 | .udma_mask = ATA_UDMA6, | 139 | .udma_mask = ATA_UDMA6, |
134 | .port_ops = &ahci_platform_ops, | 140 | .port_ops = &st_ahci_port_ops, |
135 | }; | 141 | }; |
136 | 142 | ||
137 | static int st_ahci_probe(struct platform_device *pdev) | 143 | static int st_ahci_probe(struct platform_device *pdev) |
138 | { | 144 | { |
139 | struct st_ahci_drv_data *drv_data; | 145 | struct st_ahci_drv_data *drv_data; |
140 | struct ahci_platform_data *pdata; | ||
141 | struct ahci_host_priv *hpriv; | 146 | struct ahci_host_priv *hpriv; |
142 | int err; | 147 | int err; |
143 | 148 | ||
@@ -147,13 +152,6 @@ static int st_ahci_probe(struct platform_device *pdev) | |||
147 | 152 | ||
148 | platform_set_drvdata(pdev, drv_data); | 153 | platform_set_drvdata(pdev, drv_data); |
149 | 154 | ||
150 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | ||
151 | if (!pdata) | ||
152 | return -ENOMEM; | ||
153 | |||
154 | pdata->exit = st_ahci_exit; | ||
155 | pdev->dev.platform_data = pdata; | ||
156 | |||
157 | hpriv = ahci_platform_get_resources(pdev); | 155 | hpriv = ahci_platform_get_resources(pdev); |
158 | if (IS_ERR(hpriv)) | 156 | if (IS_ERR(hpriv)) |
159 | return PTR_ERR(hpriv); | 157 | return PTR_ERR(hpriv); |