diff options
author | Rajat Jain <rajatja@google.com> | 2019-06-27 14:47:38 -0700 |
---|---|---|
committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2019-06-28 12:37:21 +0200 |
commit | c18e6ea1014ca1ade0030aca5e80af33c8873e1e (patch) | |
tree | 83b353141d21e3550f785e1f7142adc395a9a60a /drivers/platform | |
parent | 0451cc8ce272f50f9fb6569b0ecdedee6e997cea (diff) | |
download | linux-c18e6ea1014ca1ade0030aca5e80af33c8873e1e.tar.bz2 |
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/chrome/cros_ec_lightbar.c | 4 |
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; |