lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMHSBOWrzQ6NEDEML-Jk8Y+M5iE6yHXn8FWpUP77VZAV7HGzhQ@mail.gmail.com>
Date:   Thu, 27 Jun 2019 15:15:08 -0700
From:   Gwendal Grignou <gwendal@...gle.com>
To:     Rajat Jain <rajatja@...gle.com>
Cc:     Benson Leung <bleung@...omium.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Guenter Roeck <groeck@...omium.org>,
        Linux Kernel <linux-kernel@...r.kernel.org>,
        rajatxjain@...il.com, Evan Green <evgreen@...gle.com>
Subject: Re: [PATCH] platform/chrome: lightbar: Get drvdata from parent in suspend/resume

Reviewed-by: Gwendal Grignou <gwendal@...omium.org>


On Thu, Jun 27, 2019 at 2:47 PM Rajat Jain <rajatja@...gle.com> wrote:
>
> 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@...gle.com>
> ---
>  drivers/platform/chrome/cros_ec_lightbar.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
> index d30a6650b0b5..26117a8991b3 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;
> --
> 2.22.0.410.gd8fdbe21b5-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ