diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2019-05-09 16:23:39 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2019-05-14 09:13:28 +0200 |
commit | ed835136ee679dc528333c454ca4d1543c5aab76 (patch) | |
tree | a56bad55fdb4e66815cf036bbdfb0fb670c4a3b0 /drivers/mfd/tc6387xb.c | |
parent | mfd: cros_ec: Instantiate properly CrOS Touchpad MCU device (diff) | |
download | linux-ed835136ee679dc528333c454ca4d1543c5aab76.tar.xz linux-ed835136ee679dc528333c454ca4d1543c5aab76.zip |
mfd: Use dev_get_drvdata() directly
Using dev_get_drvdata directly.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/tc6387xb.c')
-rw-r--r-- | drivers/mfd/tc6387xb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c index 85fab3729102..f417c6fecfe2 100644 --- a/drivers/mfd/tc6387xb.c +++ b/drivers/mfd/tc6387xb.c @@ -80,16 +80,14 @@ static int tc6387xb_resume(struct platform_device *dev) static void tc6387xb_mmc_pwr(struct platform_device *mmc, int state) { - struct platform_device *dev = to_platform_device(mmc->dev.parent); - struct tc6387xb *tc6387xb = platform_get_drvdata(dev); + struct tc6387xb *tc6387xb = dev_get_drvdata(mmc->dev.parent); tmio_core_mmc_pwr(tc6387xb->scr + 0x200, 0, state); } static void tc6387xb_mmc_clk_div(struct platform_device *mmc, int state) { - struct platform_device *dev = to_platform_device(mmc->dev.parent); - struct tc6387xb *tc6387xb = platform_get_drvdata(dev); + struct tc6387xb *tc6387xb = dev_get_drvdata(mmc->dev.parent); tmio_core_mmc_clk_div(tc6387xb->scr + 0x200, 0, state); } @@ -97,8 +95,7 @@ static void tc6387xb_mmc_clk_div(struct platform_device *mmc, int state) static int tc6387xb_mmc_enable(struct platform_device *mmc) { - struct platform_device *dev = to_platform_device(mmc->dev.parent); - struct tc6387xb *tc6387xb = platform_get_drvdata(dev); + struct tc6387xb *tc6387xb = dev_get_drvdata(mmc->dev.parent); clk_prepare_enable(tc6387xb->clk32k); @@ -110,8 +107,7 @@ static int tc6387xb_mmc_enable(struct platform_device *mmc) static int tc6387xb_mmc_disable(struct platform_device *mmc) { - struct platform_device *dev = to_platform_device(mmc->dev.parent); - struct tc6387xb *tc6387xb = platform_get_drvdata(dev); + struct tc6387xb *tc6387xb = dev_get_drvdata(mmc->dev.parent); clk_disable_unprepare(tc6387xb->clk32k); |