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: <126d8fe6-1480-137c-ac64-d828a32b99f9@xs4all.nl>
Date:   Mon, 13 Jul 2020 12:03:21 +0200
From:   Hans Verkuil <hverkuil@...all.nl>
To:     Vaibhav Gupta <vaibhavgupta40@...il.com>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>, bjorn@...gaas.com,
        Vaibhav Gupta <vaibhav.varodek@...il.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        skhan@...uxfoundation.org
Subject: Re: [PATCH v1 3/6] [media] cx25821: use generic power management

On 29/06/2020 09:36, Vaibhav Gupta wrote:
> The .suspend() and .resume() callbacks are not defined for this driver.
> Still, their power managemgement stucture can be easily upgraded to
> gemeric, without affecting its normal behaviour.
> 
> Hence, define them NULL and use struct dev_pm_ops type to bind them.
> 
> Compile-tested only.
> 
> Signed-off-by: Vaibhav Gupta <vaibhavgupta40@...il.com>
> ---
>  drivers/media/pci/cx25821/cx25821-core.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c
> index 41be22ce66f3..59501939d741 100644
> --- a/drivers/media/pci/cx25821/cx25821-core.c
> +++ b/drivers/media/pci/cx25821/cx25821-core.c
> @@ -1369,14 +1369,18 @@ static const struct pci_device_id cx25821_pci_tbl[] = {
>  
>  MODULE_DEVICE_TABLE(pci, cx25821_pci_tbl);
>  
> +#define cx25821_suspend NULL
> +#define cx25821_resume NULL
> +
> +static SIMPLE_DEV_PM_OPS(cx25821_pm_ops, cx25821_suspend, cx25821_resume);
> +
>  static struct pci_driver cx25821_pci_driver = {
>  	.name = "cx25821",
>  	.id_table = cx25821_pci_tbl,
>  	.probe = cx25821_initdev,
>  	.remove = cx25821_finidev,
>  	/* TODO */
> -	.suspend = NULL,
> -	.resume = NULL,
> +	.driver.pm = &cx25821_pm_ops,
>  };

Same question as for 2/6.

Regards,

	Hans

>  
>  static int __init cx25821_init(void)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ