]> 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)
commitafb90958b9c3f96d18d2ae812f22edb622db4386
tree9844cba6d2e8095ac63a6271cf4066c30aca49ec
parent3f71e199d03c5389f992b4953b7a8479961f6cbe
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