Re: [PATCH next 15/25] media: platform: Use dev_get_drvdata()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Tue, 23 Apr 2019 15:50:10 +0800
Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> 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@xxxxxxxxxx>

> 
> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> Cc: Benson Leung <bleung@xxxxxxxxxxxx>
> Cc: Enric Balletbo i Serra <enric.balletbo@xxxxxxxxxxxxx>
> Cc: linux-media@xxxxxxxxxxxxxxx
> Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux