diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-06-03 00:41:03 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-06-27 11:13:02 -0400 |
commit | 6e2c0f3ffbb54547edcf1dd92a120ff37988a4d8 (patch) | |
tree | 7bd6cb1a14d17f91a6a669c48bf9a837b786b599 /drivers/mmc | |
parent | 7913ae7d10d82bf9d9af6be6c20281fceb695ec0 (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')
-rw-r--r-- | drivers/mmc/host/cb710-mmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/cb710-mmc.h | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sh_mobile_sdhi.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index 777ca2046b27..9d6e2b844404 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) | |||
703 | if (!mmc) | 703 | if (!mmc) |
704 | return -ENOMEM; | 704 | return -ENOMEM; |
705 | 705 | ||
706 | dev_set_drvdata(&pdev->dev, mmc); | 706 | platform_set_drvdata(pdev, mmc); |
707 | 707 | ||
708 | /* harmless (maybe) magic */ | 708 | /* harmless (maybe) magic */ |
709 | pci_read_config_dword(chip->pdev, 0x48, &val); | 709 | pci_read_config_dword(chip->pdev, 0x48, &val); |
diff --git a/drivers/mmc/host/cb710-mmc.h b/drivers/mmc/host/cb710-mmc.h index e845c776bdd7..8984ec878fc9 100644 --- a/drivers/mmc/host/cb710-mmc.h +++ b/drivers/mmc/host/cb710-mmc.h | |||
@@ -24,7 +24,7 @@ struct cb710_mmc_reader { | |||
24 | 24 | ||
25 | static inline struct mmc_host *cb710_slot_to_mmc(struct cb710_slot *slot) | 25 | static inline struct mmc_host *cb710_slot_to_mmc(struct cb710_slot *slot) |
26 | { | 26 | { |
27 | return dev_get_drvdata(&slot->pdev.dev); | 27 | return platform_get_drvdata(&slot->pdev); |
28 | } | 28 | } |
29 | 29 | ||
30 | static inline struct cb710_slot *cb710_mmc_to_slot(struct mmc_host *mmc) | 30 | static inline struct cb710_slot *cb710_mmc_to_slot(struct mmc_host *mmc) |
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 { | |||
51 | 51 | ||
52 | static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int *f) | 52 | static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int *f) |
53 | { | 53 | { |
54 | struct mmc_host *mmc = dev_get_drvdata(&pdev->dev); | 54 | struct mmc_host *mmc = platform_get_drvdata(pdev); |
55 | struct tmio_mmc_host *host = mmc_priv(mmc); | 55 | struct tmio_mmc_host *host = mmc_priv(mmc); |
56 | struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data); | 56 | struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data); |
57 | int ret = clk_enable(priv->clk); | 57 | int ret = clk_enable(priv->clk); |
@@ -64,7 +64,7 @@ static int sh_mobile_sdhi_clk_enable(struct platform_device *pdev, unsigned int | |||
64 | 64 | ||
65 | static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev) | 65 | static void sh_mobile_sdhi_clk_disable(struct platform_device *pdev) |
66 | { | 66 | { |
67 | struct mmc_host *mmc = dev_get_drvdata(&pdev->dev); | 67 | struct mmc_host *mmc = platform_get_drvdata(pdev); |
68 | struct tmio_mmc_host *host = mmc_priv(mmc); | 68 | struct tmio_mmc_host *host = mmc_priv(mmc); |
69 | struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data); | 69 | struct sh_mobile_sdhi *priv = container_of(host->pdata, struct sh_mobile_sdhi, mmc_data); |
70 | clk_disable(priv->clk); | 70 | clk_disable(priv->clk); |
@@ -119,7 +119,7 @@ static int sh_mobile_sdhi_write16_hook(struct tmio_mmc_host *host, int addr) | |||
119 | 119 | ||
120 | static void sh_mobile_sdhi_cd_wakeup(const struct platform_device *pdev) | 120 | static void sh_mobile_sdhi_cd_wakeup(const struct platform_device *pdev) |
121 | { | 121 | { |
122 | mmc_detect_change(dev_get_drvdata(&pdev->dev), msecs_to_jiffies(100)); | 122 | mmc_detect_change(platform_get_drvdata(pdev), msecs_to_jiffies(100)); |
123 | } | 123 | } |
124 | 124 | ||
125 | static const struct sh_mobile_sdhi_ops sdhi_ops = { | 125 | static const struct sh_mobile_sdhi_ops sdhi_ops = { |