summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajat Jain <rajatja@google.com>2019-06-27 14:47:38 -0700
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2019-06-28 12:37:21 +0200
commitc18e6ea1014ca1ade0030aca5e80af33c8873e1e (patch)
tree83b353141d21e3550f785e1f7142adc395a9a60a
parent0451cc8ce272f50f9fb6569b0ecdedee6e997cea (diff)
downloadlinux-stable-c18e6ea1014ca1ade0030aca5e80af33c8873e1e.tar.gz
linux-stable-c18e6ea1014ca1ade0030aca5e80af33c8873e1e.tar.bz2
linux-stable-c18e6ea1014ca1ade0030aca5e80af33c8873e1e.zip
platform/chrome: lightbar: Get drvdata from parent in suspend/resume
The lightbar driver never assigned the drvdata in probe method, and thus there is nothing there. Need to get the ec_dev from the parent's drvdata. Signed-off-by: Rajat Jain <rajatja@google.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
-rw-r--r--drivers/platform/chrome/cros_ec_lightbar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
index 23a82ee4c785..609598bbb6c3 100644
--- a/drivers/platform/chrome/cros_ec_lightbar.c
+++ b/drivers/platform/chrome/cros_ec_lightbar.c
@@ -600,7 +600,7 @@ static int cros_ec_lightbar_remove(struct platform_device *pd)
static int __maybe_unused cros_ec_lightbar_resume(struct device *dev)
{
- struct cros_ec_dev *ec_dev = dev_get_drvdata(dev);
+ struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
if (userspace_control)
return 0;
@@ -610,7 +610,7 @@ static int __maybe_unused cros_ec_lightbar_resume(struct device *dev)
static int __maybe_unused cros_ec_lightbar_suspend(struct device *dev)
{
- struct cros_ec_dev *ec_dev = dev_get_drvdata(dev);
+ struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
if (userspace_control)
return 0;