]> git.baikalelectronics.ru Git - kernel.git/commit
iio: st_sensors: Drop the protection on _avail functions
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 7 Feb 2022 14:38:32 +0000 (15:38 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 10 Apr 2022 15:15:02 +0000 (16:15 +0100)
commit6bcba851f798f331a9fea38710eacbda9d84176c
tree9844cba6d2e8095ac63a6271cf4066c30aca49ec
parentfda00142581e7edb0a44f52ed5b5cb2347db8850
iio: st_sensors: Drop the protection on _avail functions

The use of a lock there seems pointless. Besides preventing to read
these information from userspace while buffers are enabled (which is not
supposed to happen), it only protect read accesses over static const
values, which are never supposed to be written anyway.

Drop these lock calls.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20220207143840.707510-6-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/common/st_sensors/st_sensors_core.c