From patchwork Sat Jun 1 05:16:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2647021 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id DC5103FD4E for ; Sat, 1 Jun 2013 05:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750860Ab3FAFQ0 (ORCPT ); Sat, 1 Jun 2013 01:16:26 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:35309 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839Ab3FAFQZ (ORCPT ); Sat, 1 Jun 2013 01:16:25 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MNP001KT7ZB5FC0@mailout1.samsung.com> for linux-mmc@vger.kernel.org; Sat, 01 Jun 2013 14:16:23 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.49]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 6D.AA.08825.7A389A15; Sat, 01 Jun 2013 14:16:23 +0900 (KST) X-AuditID: cbfee68e-b7f276d000002279-fe-51a983a74a08 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 60.5A.21068.7A389A15; Sat, 01 Jun 2013 14:16:23 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MNP009027ZB3J50@mmp1.samsung.com>; Sat, 01 Jun 2013 14:16:23 +0900 (KST) From: Jingoo Han To: 'Chris Ball' Cc: linux-mmc@vger.kernel.org, 'Jingoo Han' , =?iso-8859-2?Q?'_Micha=B3_Miros=B3aw_'?= , Guennadi Liakhovetski , Ian Molton Subject: [PATCH] mmc: host: use platform_{get,set}_drvdata() Date: Sat, 01 Jun 2013 14:16:22 +0900 Message-id: <000001ce5e87$284f88e0$78ee9aa0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-2 Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac5eht3qQHMN1gb2Rle1OFuGvhL3pg== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOIsWRmVeSWpSXmKPExsVy+t8zQ93lzSsDDRZPEbTY/nojm8X7jfOY LO7vX8BocXnhJVaLI//7GS2+PT/F6MDm8eFjnMehK2sZPf72dbN6zGrbx+bRt2UVo8fnTXIB bFFcNimpOZllqUX6dglcGVuWX2UtmCVU8W3JL6YGxlP8XYycHBICJhI9/3ayQdhiEhfurQez hQSWMUpMa/GFqbmx/T5LFyMXUHwRo0TPrJesEM4vRonrsyeCdbAJqEl8+XKYHcQWEVCU2PL9 ODtIEbPATUaJD5MvsoIkhAVsJB6+f80MYrMIqEpsvPuLCcTmFbCUOP5iOwuELSjxY/I9IJsD qFlH4uukCJAws4C8xOY1b5khLlKQ2HH2NSPELj2JFdd2skDUiEjse/GOEaLmGrvE8Ut1EKsE JL5NPgQ2UkJAVmLTAagxkhIHV9xgmcAoNgvJ4lkIi2chWTwLyYIFjCyrGEVTC5ILipPSi4z0 ihNzi0vz0vWS83M3MUIisW8H480D1ocYk4G2T2SWEk3OB0ZyXkm8obGZkYWpiamxkbmlGWnC SuK8ai3WgUIC6YklqdmpqQWpRfFFpTmpxYcYmTg4pRoYNXMk1xzhiee+8VV1mf02u3uxknk3 G30PqWm1yFy+wsnOeHv7np7E05duz53uZm5tMLP1QcRWN/mWtaLKL5zbXZunvypV+sJw4//j e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X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Jingoo Han Acked-by: Micha? Miros?aw --- drivers/mmc/host/cb710-mmc.c | 2 +- drivers/mmc/host/sh_mobile_sdhi.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index 777ca20..9d6e2b8 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c @@ -703,7 +703,7 @@ static int cb710_mmc_init(struct platform_device *pdev) if (!mmc) return -ENOMEM; - dev_set_drvdata(&pdev->dev, mmc); + platform_set_drvdata(pdev, mmc); /* harmless (maybe) magic */ pci_read_config_dword(chip->pdev, 0x48, &val); diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index cc4c872..6a5d90e 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -51,7 +51,7 @@ struct sh_mobile_sdhi { static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int *f) { - struct mmc_host *mmc = dev_get_drvdata(&pdev->dev); + struct mmc_host *mmc = platform_get_drvdata(pdev); struct tmio_mmc_host *host = mmc_priv(mmc); struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data); int ret = clk_enable(priv->clk); @@ -64,7 +64,7 @@ static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev) { - struct mmc_host *mmc = dev_get_drvdata(&pdev->dev); + struct mmc_host *mmc = platform_get_drvdata(pdev); struct tmio_mmc_host *host = mmc_priv(mmc); struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data); clk_disable(priv->clk); @@ -119,7 +119,7 @@ static int sh_mobile_sdhi_write16_hook(struct tmio_mmc_host *host, int addr) static void sh_mobile_sdhi_cd_wakeup(const struct platform_device *pdev) { - mmc_detect_change(dev_get_drvdata(&pdev->dev), msecs_to_jiffies(100)); + mmc_detect_change(platform_get_drvdata(pdev), msecs_to_jiffies(100)); } static const struct sh_mobile_sdhi_ops sdhi_ops = {