aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sh_mobile_sdhi.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-06-03 13:41:03 +0900
committerChris Ball <cjb@laptop.org>2013-06-27 11:13:02 -0400
commit6e2c0f3ffbb54547edcf1dd92a120ff37988a4d8 (patch)
tree7bd6cb1a14d17f91a6a669c48bf9a837b786b599 /drivers/mmc/host/sh_mobile_sdhi.c
parent7913ae7d10d82bf9d9af6be6c20281fceb695ec0 (diff)
mmc: host: use platform_{get,set}_drvdata()
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 <jg1.han@samsung.com> Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sh_mobile_sdhi.c')
-rw-r--r--drivers/mmc/host/sh_mobile_sdhi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index a4316b34df1f..ebea749297c2 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 = {