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: <37527ba7-ae54-86a0-b0af-fe20d3a1e484@collabora.com>
Date:   Thu, 7 Jul 2022 00:00:21 +0300
From:   Dmitry Osipenko <dmitry.osipenko@...labora.com>
To:     Shreeya Patel <shreeya.patel@...labora.com>, jic23@...nel.org,
        lars@...afoo.de, robh+dt@...nel.org, Zhigang.Shi@...eon.com,
        krisman@...labora.com
Cc:     linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel@...labora.com,
        alvaro.soliverez@...labora.com, andy.shevchenko@...il.com,
        digetx@...il.com, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v6 2/2] iio: light: Add support for ltrf216a sensor

On 6/15/22 16:51, Shreeya Patel wrote:
> +static int ltrf216a_remove(struct i2c_client *client)
> +{
> +	struct iio_dev *indio_dev = i2c_get_clientdata(client);
> +
> +	iio_device_unregister(indio_dev);
> +	pm_runtime_disable(&client->dev);
> +	pm_runtime_set_suspended(&client->dev);
> +	ltrf216a_disable(indio_dev);
> +
> +	return 0;
> +}

As Jonathan said, there is no need to disable sensor in the remove()
since you're using devm_add_action_or_reset().

If you're going to use devm_pm_runtime_enable(), then let's also use
devm_iio_device_register() and in this case the ltrf216a_remove() is not
needed anymore at all since the removal will be handled by the driver
core entirely, i.e. you'll need to drop ltrf216a_remove().

-- 
Best regards,
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ