Skip to content

Commit

Permalink
hid: iio: rename struct hid_sensor_iio_common to hid_sensor_common
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Holler authored and Jonathan Cameron committed Jan 6, 2013
1 parent 62e00cb commit e07c6d1
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion drivers/iio/accel/hid-sensor-accel-3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};
Expand Down
10 changes: 5 additions & 5 deletions drivers/iio/common/hid-sensors/hid-sensor-attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions drivers/iio/common/hid-sensors/hid-sensor-trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/common/hid-sensors/hid-sensor-trigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion drivers/iio/gyro/hid-sensor-gyro-3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/light/hid-sensor-als.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/magnetometer/hid-sensor-magn-3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-hid-sensor-time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions include/linux/hid-sensor-hub.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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

0 comments on commit e07c6d1

Please sign in to comment.