diff options
| author | Rajat Jain <rajatja@google.com> | 2019-06-27 17:47:38 -0400 |
|---|---|---|
| committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2019-06-28 06:37:21 -0400 |
| commit | c18e6ea1014ca1ade0030aca5e80af33c8873e1e (patch) | |
| tree | 83b353141d21e3550f785e1f7142adc395a9a60a | |
| parent | 0451cc8ce272f50f9fb6569b0ecdedee6e997cea (diff) | |
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.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) | |||
| 600 | 600 | ||
| 601 | static int __maybe_unused cros_ec_lightbar_resume(struct device *dev) | 601 | static int __maybe_unused cros_ec_lightbar_resume(struct device *dev) |
| 602 | { | 602 | { |
| 603 | struct cros_ec_dev *ec_dev = dev_get_drvdata(dev); | 603 | struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent); |
| 604 | 604 | ||
| 605 | if (userspace_control) | 605 | if (userspace_control) |
| 606 | return 0; | 606 | return 0; |
| @@ -610,7 +610,7 @@ static int __maybe_unused cros_ec_lightbar_resume(struct device *dev) | |||
| 610 | 610 | ||
| 611 | static int __maybe_unused cros_ec_lightbar_suspend(struct device *dev) | 611 | static int __maybe_unused cros_ec_lightbar_suspend(struct device *dev) |
| 612 | { | 612 | { |
| 613 | struct cros_ec_dev *ec_dev = dev_get_drvdata(dev); | 613 | struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent); |
| 614 | 614 | ||
| 615 | if (userspace_control) | 615 | if (userspace_control) |
| 616 | return 0; | 616 | return 0; |
