lkml.org 
[lkml]   [2019]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH next 15/25] media: platform: Use dev_get_drvdata()
Em Tue, 23 Apr 2019 15:50:10 +0800
Kefeng Wang <wangkefeng.wang@huawei.com> escreveu:

> Using dev_get_drvdata directly.

Patch looks ok to me. Assuming that this will be applied via some
other tree:

Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Benson Leung <bleung@chromium.org>
> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
> index 7bc4d8a9af28..2e218c7a3a1f 100644
> --- a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
> +++ b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
> @@ -174,8 +174,7 @@ static const struct cec_adap_ops cros_ec_cec_ops = {
> #ifdef CONFIG_PM_SLEEP
> static int cros_ec_cec_suspend(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
> + struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);
>
> if (device_may_wakeup(dev))
> enable_irq_wake(cros_ec_cec->cros_ec->irq);
> @@ -185,8 +184,7 @@ static int cros_ec_cec_suspend(struct device *dev)
>
> static int cros_ec_cec_resume(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
> + struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);
>
> if (device_may_wakeup(dev))
> disable_irq_wake(cros_ec_cec->cros_ec->irq);



Thanks,
Mauro

\
 
 \ /
  Last update: 2019-05-24 14:59    [W:0.126 / U:19.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site