Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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)


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;