linux-stable/drivers/iio
Alexandru Ardelean ca3e7d524c iio: buffer: use sysfs_attr_init() on allocated attrs
When dynamically allocating sysfs attributes, it's a good idea to call
sysfs_attr_init() on them to initialize lock_class_keys.
This change does that.

The lock_class_keys are set when the CONFIG_DEBUG_LOCK_ALLOC symbol is
enabled. Which is [likely] one reason why I did not see this during
development.

I also am not able to see this even with CONFIG_DEBUG_LOCK_ALLOC enabled,
so this may [likely] be reproduce-able on some system configurations.

This was reported via:
  https://lore.kernel.org/linux-iio/CA+U=DsrsvGgXEF30-vXuXS_k=-mjSjiBwEEzwKb1hJVn1P98OA@mail.gmail.com/T/#u

Fixes: 15097c7a1a ("iio: buffer: wrap all buffer attributes into iio_dev_attr")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210402174226.630346-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-04-07 08:36:38 +01:00
..
accel iio:accel:adis16201: Fix wrong axis assignment that prevents loading 2021-03-29 11:14:41 +01:00
adc iio: adc: stm32-dfsdm: drop __func__ while using Dynamic debug 2021-04-07 08:36:38 +01:00
afe iio: afe: iio-rescale: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
amplifiers iio: amplifiers: hmc425a: Simplify with dev_err_probe() 2020-09-03 19:40:50 +01:00
buffer iio: kfifo: add devm_iio_triggered_buffer_setup_ext variant 2021-03-25 19:13:52 +00:00
cdc iio:cdc:ad7150: Move driver out of staging. 2021-04-07 08:36:37 +01:00
chemical iio: chemical: atlas: Remove code to set trigger parent 2021-03-25 19:13:50 +00:00
common Merge remote-tracking branch 'local/ib-iio-scmi-5.12-rc2-take3' into togreg 2021-03-26 10:23:46 +00:00
dac iio: dac: Rudimentary typo fix 2021-03-29 11:28:24 +01:00
dummy iio: dummy: iio_simple_dummy_buffer: use triggered buffer core calls 2021-03-11 20:47:05 +00:00
frequency iio: frequency: adf4350: Remove redundant null check before clk_disable_unprepare 2021-01-09 21:52:46 +00:00
gyro 1st set of IIO/counter device support, features and cleanup in the 5.13 cycle 2021-03-26 12:09:47 +01:00
health iio: fix devm_iio_trigger_alloc with parent.cocci 2021-03-25 19:13:50 +00:00
humidity 1st set of IIO/counter device support, features and cleanup in the 5.13 cycle 2021-03-26 12:09:47 +01:00
imu iio: inv_mpu6050: Make interrupt optional 2021-04-07 08:36:35 +01:00
light 1st set of IIO/counter device support, features and cleanup in the 5.13 cycle 2021-03-26 12:09:47 +01:00
magnetometer iio:magnetometer: Add Support for ST IIS2MDC 2021-03-25 19:13:52 +00:00
multiplexer iio: multiplexer: iio-mux: Simplify with dev_err_probe() 2020-09-03 19:40:51 +01:00
orientation hid-sensors: Add more data fields for sensitivity checking 2021-03-11 20:47:09 +00:00
position iio: hid-sensors: Move get sensitivity attribute to hid-sensor-common 2021-03-11 20:47:09 +00:00
potentiometer iio: use getter/setter functions 2021-03-11 20:47:07 +00:00
potentiostat iio: lmp91000: Remove code to set trigger parent 2021-03-25 19:13:50 +00:00
pressure iio: cros: unify hw fifo attributes without API changes 2021-03-25 19:13:52 +00:00
proximity iio: as3935: Remove code to set trigger parent 2021-03-25 19:13:50 +00:00
resolver iio:resolver:ad2s1200: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
temperature 1st set of IIO/counter device support, features and cleanup in the 5.13 cycle 2021-03-26 12:09:47 +01:00
test iio: Add basic unit test for iio_format_value() 2021-03-11 20:47:00 +00:00
trigger iio: set default trig->dev.parent 2021-03-25 19:13:50 +00:00
iio_core.h iio: buffer: fix use-after-free for attached_buffers array 2021-03-25 19:13:51 +00:00
iio_core_trigger.h iio: core-trigger: make iio_device_register_trigger_consumer() an int return 2021-03-11 20:47:02 +00:00
industrialio-buffer.c iio: buffer: use sysfs_attr_init() on allocated attrs 2021-04-07 08:36:38 +01:00
industrialio-configfs.c
industrialio-core.c iio: __iio_format_value(): Convert to sysfs_emit_at() 2021-03-29 11:12:30 +01:00
industrialio-event.c iio:event: Add timeout event info type 2021-04-07 08:36:36 +01:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: Fix strange (ladder-type) indentation 2021-04-07 08:36:38 +01:00
industrialio-triggered-event.c
inkern.c iio: Fix iio_read_channel_processed_scale() 2021-04-07 08:35:51 +01:00
Kconfig iio:cdc:ad7150: Move driver out of staging. 2021-04-07 08:36:37 +01:00
Makefile iio:cdc:ad7150: Move driver out of staging. 2021-04-07 08:36:37 +01:00
TODO iio: add a TODO 2020-03-08 17:28:53 +00:00