iio: hid-sensors: Move get sensitivity attribute to hid-sensor-common
authorYe Xiang <xiang.ye@intel.com>
Mon, 1 Feb 2021 05:49:20 +0000 (13:49 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 11 Mar 2021 20:47:09 +0000 (20:47 +0000)
commit0e41fd515f94dcfcc24b6e510d29528431e46f60
tree4241774ab41be2b01c6b098e0ee3c6dec4ec6b44
parent6bc5ebe8aa08637355cd891e596b5bce63497cb5
iio: hid-sensors: Move get sensitivity attribute to hid-sensor-common

No functional change has been made with this patch. The main intent here
is to reduce code repetition of getting sensitivity attribute.

In the current implementation, sensor_hub_input_get_attribute_info() is
called from multiple drivers to get attribute info for sensitivity
field. Moving this to common place will avoid code repetition.

Signed-off-by: Ye Xiang <xiang.ye@intel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210201054921.18214-2-xiang.ye@intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
14 files changed:
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/common/hid-sensors/hid-sensor-attributes.c
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/humidity/hid-sensor-humidity.c
drivers/iio/light/hid-sensor-als.c
drivers/iio/light/hid-sensor-prox.c
drivers/iio/magnetometer/hid-sensor-magn-3d.c
drivers/iio/orientation/hid-sensor-incl-3d.c
drivers/iio/orientation/hid-sensor-rotation.c
drivers/iio/position/hid-sensor-custom-intel-hinge.c
drivers/iio/pressure/hid-sensor-press.c
drivers/iio/temperature/hid-sensor-temperature.c
drivers/rtc/rtc-hid-sensor-time.c
include/linux/hid-sensor-hub.h