Commit c18e6ea1 authored by Rajat Jain's avatar Rajat Jain Committed by Enric Balletbo i Serra

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: default avatarRajat Jain <rajatja@google.com>
Reviewed-by: default avatarGwendal Grignou <gwendal@chromium.org>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 0451cc8c
...@@ -600,7 +600,7 @@ static int cros_ec_lightbar_remove(struct platform_device *pd) ...@@ -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) 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) if (userspace_control)
return 0; return 0;
...@@ -610,7 +610,7 @@ static int __maybe_unused cros_ec_lightbar_resume(struct device *dev) ...@@ -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) 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) if (userspace_control)
return 0; return 0;
......
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