hid: iio: rename struct hid_sensor_iio_common to hid_sensor_common
authorAlexander Holler <holler@ahsoftware.de>
Sat, 15 Dec 2012 12:45:00 +0000 (12:45 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sun, 6 Jan 2013 11:48:11 +0000 (11:48 +0000)
The structure with common attributes for hid-sensors isn't specific
to the iio-subsystem, so rename it to hid_sensor_common.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/common/hid-sensors/hid-sensor-attributes.c
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
drivers/iio/common/hid-sensors/hid-sensor-trigger.h
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/light/hid-sensor-als.c
drivers/iio/magnetometer/hid-sensor-magn-3d.c
drivers/rtc/rtc-hid-sensor-time.c
include/linux/hid-sensor-hub.h

index 268ca3a1030e463cf3bba2bf8ee81e009c79c8d5..253684ebc572183ac435cf5517d1118c0d60ba68 100644 (file)
@@ -43,7 +43,7 @@ enum accel_3d_channel {
 
 struct accel_3d_state {
        struct hid_sensor_hub_callbacks callbacks;
-       struct hid_sensor_iio_common common_attributes;
+       struct hid_sensor_common common_attributes;
        struct hid_sensor_hub_attribute_info accel[ACCEL_3D_CHANNEL_MAX];
        u32 accel_val[ACCEL_3D_CHANNEL_MAX];
 };
index 5873f160bac9a11b61e79cb2b988467a3e9c04e1..75b54730a963ab9c950ff465cd935047fc06306b 100644 (file)
@@ -113,7 +113,7 @@ static u32 convert_to_vtf_format(int size, int exp, int val1, int val2)
        return value;
 }
 
-int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st,
+int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,
                                int *val1, int *val2)
 {
        s32 value;
@@ -140,7 +140,7 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st,
 }
 EXPORT_SYMBOL(hid_sensor_read_samp_freq_value);
 
-int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st,
+int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
                                int val1, int val2)
 {
        s32 value;
@@ -168,7 +168,7 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st,
 }
 EXPORT_SYMBOL(hid_sensor_write_samp_freq_value);
 
-int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st,
+int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,
                                int *val1, int *val2)
 {
        s32 value;
@@ -190,7 +190,7 @@ int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st,
 }
 EXPORT_SYMBOL(hid_sensor_read_raw_hyst_value);
 
-int hid_sensor_write_raw_hyst_value(struct hid_sensor_iio_common *st,
+int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
                                        int val1, int val2)
 {
        s32 value;
@@ -211,7 +211,7 @@ EXPORT_SYMBOL(hid_sensor_write_raw_hyst_value);
 
 int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
                                        u32 usage_id,
-                                       struct hid_sensor_iio_common *st)
+                                       struct hid_sensor_common *st)
 {
 
        sensor_hub_input_get_attribute_info(hsdev,
index 7da73800dcddd647a2ec698865227bc63142de34..7a525a91105d38a7570c1caddf85e41bdaf9553d 100644 (file)
@@ -31,7 +31,7 @@
 static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig,
                                                bool state)
 {
-       struct hid_sensor_iio_common *st = trig->private_data;
+       struct hid_sensor_common *st = trig->private_data;
        int state_val;
 
        state_val = state ? 1 : 0;
@@ -63,7 +63,7 @@ static const struct iio_trigger_ops hid_sensor_trigger_ops = {
 };
 
 int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
-                               struct hid_sensor_iio_common *attrb)
+                               struct hid_sensor_common *attrb)
 {
        int ret;
        struct iio_trigger *trig;
index fd982971b1b868ad9cb13132f43eba307637ad5c..9a8731478eda4cdb95867e5dffdd10d1ec9bcbae 100644 (file)
@@ -20,7 +20,7 @@
 #define _HID_SENSOR_TRIGGER_H
 
 int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
-                               struct hid_sensor_iio_common *attrb);
+                               struct hid_sensor_common *attrb);
 void hid_sensor_remove_trigger(struct iio_dev *indio_dev);
 
 #endif
index 8d34ee4f33b15b6b6aa75891a96336d6f3395e61..1a64f88d1e89c747eea5e2e4b412640c1ebaa595 100644 (file)
@@ -43,7 +43,7 @@ enum gyro_3d_channel {
 
 struct gyro_3d_state {
        struct hid_sensor_hub_callbacks callbacks;
-       struct hid_sensor_iio_common common_attributes;
+       struct hid_sensor_common common_attributes;
        struct hid_sensor_hub_attribute_info gyro[GYRO_3D_CHANNEL_MAX];
        u32 gyro_val[GYRO_3D_CHANNEL_MAX];
 };
index 723f203269f25001bd56330b4a23abfe341f16f8..6ab987a13c79ce1f7e75d44fbe882c61633f2d29 100644 (file)
@@ -38,7 +38,7 @@
 
 struct als_state {
        struct hid_sensor_hub_callbacks callbacks;
-       struct hid_sensor_iio_common common_attributes;
+       struct hid_sensor_common common_attributes;
        struct hid_sensor_hub_attribute_info als_illum;
        u32 illum;
 };
index 7811c0bdc95e1c1f9c604cf2f58c7ed46641653e..28026e2ab06b9d7fb3df1c4b31d03877a8645022 100644 (file)
@@ -43,7 +43,7 @@ enum magn_3d_channel {
 
 struct magn_3d_state {
        struct hid_sensor_hub_callbacks callbacks;
-       struct hid_sensor_iio_common common_attributes;
+       struct hid_sensor_common common_attributes;
        struct hid_sensor_hub_attribute_info magn[MAGN_3D_CHANNEL_MAX];
        u32 magn_val[MAGN_3D_CHANNEL_MAX];
 };
index 25cac6ec374d50531ba96eb7d3e2e2f7e654eed6..0438c9ee9a3b49a15c9266560388038184e330b2 100644 (file)
@@ -39,7 +39,7 @@ enum hid_time_channel {
 
 struct hid_time_state {
        struct hid_sensor_hub_callbacks callbacks;
-       struct hid_sensor_iio_common common_attributes;
+       struct hid_sensor_common common_attributes;
        struct hid_sensor_hub_attribute_info info[TIME_RTC_CHANNEL_MAX];
        struct rtc_time last_time;
        spinlock_t lock_last_time;
index e6265f94d81658061d74dc306198d7b9ded9ca7a..ecefb7311dd61c2310114c71a0e2f54608ce3597 100644 (file)
@@ -161,7 +161,7 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
 /* hid-sensor-attributes */
 
 /* Common hid sensor iio structure */
-struct hid_sensor_iio_common {
+struct hid_sensor_common {
        struct hid_sensor_hub_device *hsdev;
        struct platform_device *pdev;
        unsigned usage_id;
@@ -185,14 +185,14 @@ static inline int hid_sensor_convert_exponent(int unit_expo)
 
 int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
                                        u32 usage_id,
-                                       struct hid_sensor_iio_common *st);
-int hid_sensor_write_raw_hyst_value(struct hid_sensor_iio_common *st,
+                                       struct hid_sensor_common *st);
+int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
                                        int val1, int val2);
-int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st,
+int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,
                                        int *val1, int *val2);
-int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st,
+int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
                                        int val1, int val2);
-int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st,
+int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,
                                        int *val1, int *val2);
 
 #endif