From patchwork Fri Mar 14 18:21:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 3834541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 356589F1CD for ; Fri, 14 Mar 2014 18:22:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C54D20295 for ; Fri, 14 Mar 2014 18:22:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6DA29201C0 for ; Fri, 14 Mar 2014 18:22:47 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOWkm-0005T4-Ei; Fri, 14 Mar 2014 18:22:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOWkj-0004Xv-Qk; Fri, 14 Mar 2014 18:22:41 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOWkg-0004Wp-2o for linux-arm-kernel@lists.infradead.org; Fri, 14 Mar 2014 18:22:39 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N2F00CHQV13PF70@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Sat, 15 Mar 2014 03:22:15 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-13-532348d6bb31 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id A5.53.28157.6D843235; Sat, 15 Mar 2014 03:22:14 +0900 (KST) Received: from amdc1032.localnet ([106.116.147.136]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N2F00M3NV11V700@mmp2.samsung.com>; Sat, 15 Mar 2014 03:22:14 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Tejun Heo Subject: [PATCH 2/2] ata: ahci_st: remove deprecated struct ahci_platform_data usage Date: Fri, 14 Mar 2014 19:21:59 +0100 Message-id: <1561239.uqrRD3ZCZp@amdc1032> User-Agent: KMail/4.8.4 (Linux/3.2.0-54-generic-pae; KDE/4.8.5; i686; ; ) MIME-version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMLMWRmVeSWpSXmKPExsVy+t9jQd1rHsrBBie+21jc/3qU0WLT42us Fsd2PGKyuLxrDpvFr+VHGR1YPTat6mTzuHNtD5vH5iX1Hp83yQWwRHHZpKTmZJalFunbJXBl vP7dxFywVaCi/UVGA+NB3i5GTg4JAROJvSefMUHYYhIX7q1n62Lk4hASmM4osWzrAyinhUni zd0TLCBVbAJWEhPbVzGC2CICshJXpj1kBCliFmhllJi9Yio7SEJYIEzi+N9FYGNZBFQl1q5+ yNrFyMHBK6Ap0bozHSQsKuApsWP7SjYQm1dAUOLH5Htg85kF5CX27Z/KCmFrSazfeZxpAiPf LCRls5CUzUJStoCReRWjaGpBckFxUnqukV5xYm5xaV66XnJ+7iZGcFA+k97BuKrB4hCjAAej Eg/vBSXlYCHWxLLiytxDjBIczEoivPuNgUK8KYmVValF+fFFpTmpxYcYpTlYlMR5D7ZaBwoJ pCeWpGanphakFsFkmTg4pRoYg/5MucjReviPTUTD7KNF57js9ngzMcaff93wUHSB4LLeXBPz 5S9ltFO/5kSuZLs+edHkzFd7p7yc/+b5AYHo/X+uFO3x2bFg+avczWu9Yl6F1+plLr1T1z03 9++RYC2jg4z1FT8dXjidyNWf4VYjy6t5SYR39/IZZR8U7HKuvXwtNefnFFHrnUosxRmJhlrM RcWJAIRxsBxGAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140314_142238_339011_313EE904 X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.9 (------) Cc: linux-ide@vger.kernel.org, Lee Jones , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP struct ahci_platform_data is deprecated (please see comments in for details). Convert ahci_st driver to use custom ->host_stop method instead. Signed-off-by: Bartlomiej Zolnierkiewicz --- 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);