* [PATCH 2/2] ata: ahci_st: remove deprecated struct ahci_platform_data usage
@ 2014-03-14 18:21 Bartlomiej Zolnierkiewicz
2014-03-14 18:27 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2014-03-14 18:21 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
Compile tested only.
drivers/ata/ahci_st.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
Index: b/drivers/ata/ahci_st.c
===================================================================
--- a/drivers/ata/ahci_st.c 2014-03-14 19:17:32.216568395 +0100
+++ b/drivers/ata/ahci_st.c 2014-03-14 19:18:27.912567444 +0100
@@ -87,10 +87,11 @@ static int st_ahci_deassert_resets(struc
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 p
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
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] ata: ahci_st: remove deprecated struct ahci_platform_data usage
2014-03-14 18:21 [PATCH 2/2] ata: ahci_st: remove deprecated struct ahci_platform_data usage Bartlomiej Zolnierkiewicz
@ 2014-03-14 18:27 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2014-03-14 18:27 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 14, 2014 at 07:21:59PM +0100, Bartlomiej Zolnierkiewicz wrote:
> 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>
Applied to 1-2 to libata/for-3.15.
Hmm... I'll wait for your reviews from now on.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-14 18:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 18:21 [PATCH 2/2] ata: ahci_st: remove deprecated struct ahci_platform_data usage Bartlomiej Zolnierkiewicz
2014-03-14 18:27 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).