aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/iio/accel/hid-sensor-accel-3d.c2
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-attributes.c10
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-trigger.c4
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-trigger.h2
-rw-r--r--drivers/iio/gyro/hid-sensor-gyro-3d.c2
-rw-r--r--drivers/iio/light/hid-sensor-als.c2
-rw-r--r--drivers/iio/magnetometer/hid-sensor-magn-3d.c2
-rw-r--r--drivers/rtc/rtc-hid-sensor-time.c2
-rw-r--r--include/linux/hid-sensor-hub.h12
9 files changed, 19 insertions, 19 deletions
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index 268ca3a1030e..253684ebc572 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -43,7 +43,7 @@ enum accel_3d_channel {
43 43
44struct accel_3d_state { 44struct accel_3d_state {
45 struct hid_sensor_hub_callbacks callbacks; 45 struct hid_sensor_hub_callbacks callbacks;
46 struct hid_sensor_iio_common common_attributes; 46 struct hid_sensor_common common_attributes;
47 struct hid_sensor_hub_attribute_info accel[ACCEL_3D_CHANNEL_MAX]; 47 struct hid_sensor_hub_attribute_info accel[ACCEL_3D_CHANNEL_MAX];
48 u32 accel_val[ACCEL_3D_CHANNEL_MAX]; 48 u32 accel_val[ACCEL_3D_CHANNEL_MAX];
49}; 49};
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
index 5873f160bac9..75b54730a963 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
@@ -113,7 +113,7 @@ static u32 convert_to_vtf_format(int size, int exp, int val1, int val2)
113 return value; 113 return value;
114} 114}
115 115
116int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st, 116int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,
117 int *val1, int *val2) 117 int *val1, int *val2)
118{ 118{
119 s32 value; 119 s32 value;
@@ -140,7 +140,7 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st,
140} 140}
141EXPORT_SYMBOL(hid_sensor_read_samp_freq_value); 141EXPORT_SYMBOL(hid_sensor_read_samp_freq_value);
142 142
143int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st, 143int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
144 int val1, int val2) 144 int val1, int val2)
145{ 145{
146 s32 value; 146 s32 value;
@@ -168,7 +168,7 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st,
168} 168}
169EXPORT_SYMBOL(hid_sensor_write_samp_freq_value); 169EXPORT_SYMBOL(hid_sensor_write_samp_freq_value);
170 170
171int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st, 171int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,
172 int *val1, int *val2) 172 int *val1, int *val2)
173{ 173{
174 s32 value; 174 s32 value;
@@ -190,7 +190,7 @@ int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st,
190} 190}
191EXPORT_SYMBOL(hid_sensor_read_raw_hyst_value); 191EXPORT_SYMBOL(hid_sensor_read_raw_hyst_value);
192 192
193int hid_sensor_write_raw_hyst_value(struct hid_sensor_iio_common *st, 193int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
194 int val1, int val2) 194 int val1, int val2)
195{ 195{
196 s32 value; 196 s32 value;
@@ -211,7 +211,7 @@ EXPORT_SYMBOL(hid_sensor_write_raw_hyst_value);
211 211
212int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev, 212int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
213 u32 usage_id, 213 u32 usage_id,
214 struct hid_sensor_iio_common *st) 214 struct hid_sensor_common *st)
215{ 215{
216 216
217 sensor_hub_input_get_attribute_info(hsdev, 217 sensor_hub_input_get_attribute_info(hsdev,
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index 7da73800dcdd..7a525a91105d 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -31,7 +31,7 @@
31static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig, 31static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig,
32 bool state) 32 bool state)
33{ 33{
34 struct hid_sensor_iio_common *st = trig->private_data; 34 struct hid_sensor_common *st = trig->private_data;
35 int state_val; 35 int state_val;
36 36
37 state_val = state ? 1 : 0; 37 state_val = state ? 1 : 0;
@@ -63,7 +63,7 @@ static const struct iio_trigger_ops hid_sensor_trigger_ops = {
63}; 63};
64 64
65int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, 65int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
66 struct hid_sensor_iio_common *attrb) 66 struct hid_sensor_common *attrb)
67{ 67{
68 int ret; 68 int ret;
69 struct iio_trigger *trig; 69 struct iio_trigger *trig;
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
index fd982971b1b8..9a8731478eda 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
@@ -20,7 +20,7 @@
20#define _HID_SENSOR_TRIGGER_H 20#define _HID_SENSOR_TRIGGER_H
21 21
22int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, 22int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
23 struct hid_sensor_iio_common *attrb); 23 struct hid_sensor_common *attrb);
24void hid_sensor_remove_trigger(struct iio_dev *indio_dev); 24void hid_sensor_remove_trigger(struct iio_dev *indio_dev);
25 25
26#endif 26#endif
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index 8d34ee4f33b1..1a64f88d1e89 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -43,7 +43,7 @@ enum gyro_3d_channel {
43 43
44struct gyro_3d_state { 44struct gyro_3d_state {
45 struct hid_sensor_hub_callbacks callbacks; 45 struct hid_sensor_hub_callbacks callbacks;
46 struct hid_sensor_iio_common common_attributes; 46 struct hid_sensor_common common_attributes;
47 struct hid_sensor_hub_attribute_info gyro[GYRO_3D_CHANNEL_MAX]; 47 struct hid_sensor_hub_attribute_info gyro[GYRO_3D_CHANNEL_MAX];
48 u32 gyro_val[GYRO_3D_CHANNEL_MAX]; 48 u32 gyro_val[GYRO_3D_CHANNEL_MAX];
49}; 49};
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
index 723f203269f2..6ab987a13c79 100644
--- a/drivers/iio/light/hid-sensor-als.c
+++ b/drivers/iio/light/hid-sensor-als.c
@@ -38,7 +38,7 @@
38 38
39struct als_state { 39struct als_state {
40 struct hid_sensor_hub_callbacks callbacks; 40 struct hid_sensor_hub_callbacks callbacks;
41 struct hid_sensor_iio_common common_attributes; 41 struct hid_sensor_common common_attributes;
42 struct hid_sensor_hub_attribute_info als_illum; 42 struct hid_sensor_hub_attribute_info als_illum;
43 u32 illum; 43 u32 illum;
44}; 44};
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
index 7811c0bdc95e..28026e2ab06b 100644
--- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
+++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
@@ -43,7 +43,7 @@ enum magn_3d_channel {
43 43
44struct magn_3d_state { 44struct magn_3d_state {
45 struct hid_sensor_hub_callbacks callbacks; 45 struct hid_sensor_hub_callbacks callbacks;
46 struct hid_sensor_iio_common common_attributes; 46 struct hid_sensor_common common_attributes;
47 struct hid_sensor_hub_attribute_info magn[MAGN_3D_CHANNEL_MAX]; 47 struct hid_sensor_hub_attribute_info magn[MAGN_3D_CHANNEL_MAX];
48 u32 magn_val[MAGN_3D_CHANNEL_MAX]; 48 u32 magn_val[MAGN_3D_CHANNEL_MAX];
49}; 49};
diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c
index 25cac6ec374d..0438c9ee9a3b 100644
--- a/drivers/rtc/rtc-hid-sensor-time.c
+++ b/drivers/rtc/rtc-hid-sensor-time.c
@@ -39,7 +39,7 @@ enum hid_time_channel {
39 39
40struct hid_time_state { 40struct hid_time_state {
41 struct hid_sensor_hub_callbacks callbacks; 41 struct hid_sensor_hub_callbacks callbacks;
42 struct hid_sensor_iio_common common_attributes; 42 struct hid_sensor_common common_attributes;
43 struct hid_sensor_hub_attribute_info info[TIME_RTC_CHANNEL_MAX]; 43 struct hid_sensor_hub_attribute_info info[TIME_RTC_CHANNEL_MAX];
44 struct rtc_time last_time; 44 struct rtc_time last_time;
45 spinlock_t lock_last_time; 45 spinlock_t lock_last_time;
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
index e6265f94d816..ecefb7311dd6 100644
--- a/include/linux/hid-sensor-hub.h
+++ b/include/linux/hid-sensor-hub.h
@@ -161,7 +161,7 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
161/* hid-sensor-attributes */ 161/* hid-sensor-attributes */
162 162
163/* Common hid sensor iio structure */ 163/* Common hid sensor iio structure */
164struct hid_sensor_iio_common { 164struct hid_sensor_common {
165 struct hid_sensor_hub_device *hsdev; 165 struct hid_sensor_hub_device *hsdev;
166 struct platform_device *pdev; 166 struct platform_device *pdev;
167 unsigned usage_id; 167 unsigned usage_id;
@@ -185,14 +185,14 @@ static inline int hid_sensor_convert_exponent(int unit_expo)
185 185
186int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev, 186int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
187 u32 usage_id, 187 u32 usage_id,
188 struct hid_sensor_iio_common *st); 188 struct hid_sensor_common *st);
189int hid_sensor_write_raw_hyst_value(struct hid_sensor_iio_common *st, 189int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
190 int val1, int val2); 190 int val1, int val2);
191int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st, 191int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,
192 int *val1, int *val2); 192 int *val1, int *val2);
193int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st, 193int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
194 int val1, int val2); 194 int val1, int val2);
195int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st, 195int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,
196 int *val1, int *val2); 196 int *val1, int *val2);
197 197
198#endif 198#endif