Commit 3c31e04b authored by Wolfram Sang's avatar Wolfram Sang Committed by Greg Kroah-Hartman

staging: nvec: 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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: default avatarMarc Dietrich <marvin24@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cc1c0eea
...@@ -925,8 +925,7 @@ static int tegra_nvec_remove(struct platform_device *pdev) ...@@ -925,8 +925,7 @@ static int tegra_nvec_remove(struct platform_device *pdev)
static int nvec_suspend(struct device *dev) static int nvec_suspend(struct device *dev)
{ {
int err; int err;
struct platform_device *pdev = to_platform_device(dev); struct nvec_chip *nvec = dev_get_drvdata(dev);
struct nvec_chip *nvec = platform_get_drvdata(pdev);
struct nvec_msg *msg; struct nvec_msg *msg;
char ap_suspend[] = { NVEC_SLEEP, AP_SUSPEND }; char ap_suspend[] = { NVEC_SLEEP, AP_SUSPEND };
...@@ -946,8 +945,7 @@ static int nvec_suspend(struct device *dev) ...@@ -946,8 +945,7 @@ static int nvec_suspend(struct device *dev)
static int nvec_resume(struct device *dev) static int nvec_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct nvec_chip *nvec = dev_get_drvdata(dev);
struct nvec_chip *nvec = platform_get_drvdata(pdev);
dev_dbg(nvec->dev, "resuming\n"); dev_dbg(nvec->dev, "resuming\n");
tegra_init_i2c_slave(nvec); tegra_init_i2c_slave(nvec);
......
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