]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: core: introduce iio_device_{claim|release}_buffer_mode() APIs
authorNuno Sá <nuno.sa@analog.com>
Wed, 12 Oct 2022 15:16:17 +0000 (17:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:58:58 +0000 (11:58 +0200)
commita9c471892d75847671a246619c2148578f22bbc6
tree1b5262aac954f215a31d38c0be6a938b5e24be79
parenteafbb19661527a1fc1a6b6c821f5b3d8c49db371
iio: core: introduce iio_device_{claim|release}_buffer_mode() APIs

[ Upstream commit 0a8565425afd8ba0e1a0ea73e21da119ee6dacea ]

These APIs are analogous to iio_device_claim_direct_mode() and
iio_device_release_direct_mode() but, as the name suggests, with the
logic flipped. While this looks odd enough, it will have at least two
users (in following changes) and it will be important to move the IIO
mlock to the private struct.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20221012151620.1725215-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 7771c8c80d62 ("iio: cros_ec: fix an use-after-free in cros_ec_sensors_push_data()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/industrialio-core.c
include/linux/iio/iio.h