aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-hid-sensor-time.c
diff options
context:
space:
mode:
authorYe Xiang <xiang.ye@intel.com>2021-02-01 13:49:20 +0800
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-03-11 20:47:09 +0000
commit0e41fd515f94dcfcc24b6e510d29528431e46f60 (patch)
tree4241774ab41be2b01c6b098e0ee3c6dec4ec6b44 /drivers/rtc/rtc-hid-sensor-time.c
parent6bc5ebe8aa08637355cd891e596b5bce63497cb5 (diff)
downloadlinux-0e41fd515f94dcfcc24b6e510d29528431e46f60.tar.gz
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>
Diffstat (limited to 'drivers/rtc/rtc-hid-sensor-time.c')
-rw-r--r--drivers/rtc/rtc-hid-sensor-time.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c
index 1b42ee0758d29..47cd12db23568 100644
--- a/drivers/rtc/rtc-hid-sensor-time.c
+++ b/drivers/rtc/rtc-hid-sensor-time.c
@@ -238,7 +238,9 @@ static int hid_time_probe(struct platform_device *pdev)
ret = hid_sensor_parse_common_attributes(hsdev,
HID_USAGE_SENSOR_TIME,
- &time_state->common_attributes);
+ &time_state->common_attributes,
+ NULL,
+ 0);
if (ret) {
dev_err(&pdev->dev, "failed to setup common attributes!\n");
return ret;