summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/onenand/samsung.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-04-19 17:06:00 +0300
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-04-29 09:56:42 +0300
commit87ed67ba65225fa0e23d39f2eaec55d1b2eaa2aa (patch)
treeb2e568945a4f324e84454f073b67522b5dfedb25 /drivers/mtd/nand/onenand/samsung.c
parent3855f66c8fdb30e0e9cc67003279af2c52451a7f (diff)
downloadlinux-87ed67ba65225fa0e23d39f2eaec55d1b2eaa2aa.tar.xz
mtd: onenand: simplify getting .drvdata
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/onenand/samsung.c')
-rw-r--r--drivers/mtd/nand/onenand/samsung.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/nand/onenand/samsung.c b/drivers/mtd/nand/onenand/samsung.c
index 2e9d076e445a..4cce4c0311ca 100644
--- a/drivers/mtd/nand/onenand/samsung.c
+++ b/drivers/mtd/nand/onenand/samsung.c
@@ -958,8 +958,7 @@ static int s3c_onenand_remove(struct platform_device *pdev)
static int s3c_pm_ops_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct mtd_info *mtd = platform_get_drvdata(pdev);
+ struct mtd_info *mtd = dev_get_drvdata(dev);
struct onenand_chip *this = mtd->priv;
this->wait(mtd, FL_PM_SUSPENDED);
@@ -968,8 +967,7 @@ static int s3c_pm_ops_suspend(struct device *dev)
static int s3c_pm_ops_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct mtd_info *mtd = platform_get_drvdata(pdev);
+ struct mtd_info *mtd = dev_get_drvdata(dev);
struct onenand_chip *this = mtd->priv;
this->unlock_all(mtd);