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]
Date:   Mon, 11 Oct 2021 23:22:10 +0100
From:   Daniel Scally <djrscally@...il.com>
To:     Jacopo Mondi <jacopo@...ndi.org>,
        Krzysztof HaƂasa <khalasa@...p.pl>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Sakari Ailus <sakari.ailus@....fi>,
        Matteo Lisi <matteo.lisi@...icam.com>
Subject: Re: [PATCH v5] Driver for ON Semi AR0521 camera sensor

Hi Jacopo

On 11/10/2021 15:34, Jacopo Mondi wrote:
>>>> +static int ar0521_remove(struct i2c_client *client)
>>>> +{
>>>> +	struct v4l2_subdev *sd = i2c_get_clientdata(client);
>>>> +	struct ar0521_dev *sensor = to_ar0521_dev(sd);
>>>> +
>>>> +	v4l2_async_unregister_subdev(&sensor->sd);
>>>> +	media_entity_cleanup(&sensor->sd.entity);
>>>> +	v4l2_ctrl_handler_free(&sensor->ctrls.handler);
>>>> +	pm_runtime_disable(&client->dev);
>>>> +	pm_runtime_set_suspended(&client->dev);
>>> set_suspended() then disable maybe ?
>> Other drivers seem to do it the above way but I don't know the
>> difference.
> Maybe I'm wrong but calling set_suspend() after pm_runtime() had been
> disabled seems pointless. A minor anyway as it's in the driver's
> remove function.
>

fwiw, the kernel doc [1] for pm_runtime_set_suspended() does say that
it's not valid to call it for devices where runtime PM is still enabled.


[1]
https://elixir.bootlin.com/linux/latest/source/include/linux/pm_runtime.h#L510

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ