Commit 39e9ef1d authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Ulf Hansson

mmc: jz4740: Use dev_get_platdata

Instead of accessing the platform data pointer directly,
use the dev_get_platdata() helper.
Tested-by: default avatarMathieu Malaterre <malat@debian.org>
Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.co.uk>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 7e7845f3
...@@ -926,7 +926,7 @@ static int jz4740_mmc_request_gpio(struct device *dev, int gpio, ...@@ -926,7 +926,7 @@ static int jz4740_mmc_request_gpio(struct device *dev, int gpio,
static int jz4740_mmc_request_gpios(struct mmc_host *mmc, static int jz4740_mmc_request_gpios(struct mmc_host *mmc,
struct platform_device *pdev) struct platform_device *pdev)
{ {
struct jz4740_mmc_platform_data *pdata = pdev->dev.platform_data; struct jz4740_mmc_platform_data *pdata = dev_get_platdata(&pdev->dev);
int ret = 0; int ret = 0;
if (!pdata) if (!pdata)
...@@ -955,7 +955,7 @@ static int jz4740_mmc_request_gpios(struct mmc_host *mmc, ...@@ -955,7 +955,7 @@ static int jz4740_mmc_request_gpios(struct mmc_host *mmc,
static void jz4740_mmc_free_gpios(struct platform_device *pdev) static void jz4740_mmc_free_gpios(struct platform_device *pdev)
{ {
struct jz4740_mmc_platform_data *pdata = pdev->dev.platform_data; struct jz4740_mmc_platform_data *pdata = dev_get_platdata(&pdev->dev);
if (!pdata) if (!pdata)
return; return;
...@@ -971,7 +971,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev) ...@@ -971,7 +971,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
struct jz4740_mmc_host *host; struct jz4740_mmc_host *host;
struct jz4740_mmc_platform_data *pdata; struct jz4740_mmc_platform_data *pdata;
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
mmc = mmc_alloc_host(sizeof(struct jz4740_mmc_host), &pdev->dev); mmc = mmc_alloc_host(sizeof(struct jz4740_mmc_host), &pdev->dev);
if (!mmc) { if (!mmc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment