diff options
Diffstat (limited to 'drivers/iio/light/acpi-als.c')
-rw-r--r-- | drivers/iio/light/acpi-als.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/iio/light/acpi-als.c b/drivers/iio/light/acpi-als.c index 1dafa0756bfa..60537ec0c923 100644 --- a/drivers/iio/light/acpi-als.c +++ b/drivers/iio/light/acpi-als.c | |||
@@ -65,20 +65,20 @@ static const struct iio_chan_spec acpi_als_channels[] = { | |||
65 | * to acpi_als_channels[], the evt_buffer below will grow | 65 | * to acpi_als_channels[], the evt_buffer below will grow |
66 | * automatically. | 66 | * automatically. |
67 | */ | 67 | */ |
68 | #define EVT_NR_SOURCES ARRAY_SIZE(acpi_als_channels) | 68 | #define ACPI_ALS_EVT_NR_SOURCES ARRAY_SIZE(acpi_als_channels) |
69 | #define EVT_BUFFER_SIZE \ | 69 | #define ACPI_ALS_EVT_BUFFER_SIZE \ |
70 | (sizeof(s64) + (EVT_NR_SOURCES * sizeof(s32))) | 70 | (sizeof(s64) + (ACPI_ALS_EVT_NR_SOURCES * sizeof(s32))) |
71 | 71 | ||
72 | struct acpi_als { | 72 | struct acpi_als { |
73 | struct acpi_device *device; | 73 | struct acpi_device *device; |
74 | struct mutex lock; | 74 | struct mutex lock; |
75 | 75 | ||
76 | s32 evt_buffer[EVT_BUFFER_SIZE]; | 76 | s32 evt_buffer[ACPI_ALS_EVT_BUFFER_SIZE]; |
77 | }; | 77 | }; |
78 | 78 | ||
79 | /* | 79 | /* |
80 | * All types of properties the ACPI0008 block can report. The ALI, ALC, ALT | 80 | * All types of properties the ACPI0008 block can report. The ALI, ALC, ALT |
81 | * and ALP can all be handled by als_read_value() below, while the ALR is | 81 | * and ALP can all be handled by acpi_als_read_value() below, while the ALR is |
82 | * special. | 82 | * special. |
83 | * | 83 | * |
84 | * The _ALR property returns tables that can be used to fine-tune the values | 84 | * The _ALR property returns tables that can be used to fine-tune the values |
@@ -93,7 +93,7 @@ struct acpi_als { | |||
93 | #define ACPI_ALS_POLLING "_ALP" | 93 | #define ACPI_ALS_POLLING "_ALP" |
94 | #define ACPI_ALS_TABLES "_ALR" | 94 | #define ACPI_ALS_TABLES "_ALR" |
95 | 95 | ||
96 | static int als_read_value(struct acpi_als *als, char *prop, s32 *val) | 96 | static int acpi_als_read_value(struct acpi_als *als, char *prop, s32 *val) |
97 | { | 97 | { |
98 | unsigned long long temp_val; | 98 | unsigned long long temp_val; |
99 | acpi_status status; | 99 | acpi_status status; |
@@ -122,11 +122,11 @@ static void acpi_als_notify(struct acpi_device *device, u32 event) | |||
122 | 122 | ||
123 | mutex_lock(&als->lock); | 123 | mutex_lock(&als->lock); |
124 | 124 | ||
125 | memset(buffer, 0, EVT_BUFFER_SIZE); | 125 | memset(buffer, 0, ACPI_ALS_EVT_BUFFER_SIZE); |
126 | 126 | ||
127 | switch (event) { | 127 | switch (event) { |
128 | case ACPI_ALS_NOTIFY_ILLUMINANCE: | 128 | case ACPI_ALS_NOTIFY_ILLUMINANCE: |
129 | ret = als_read_value(als, ACPI_ALS_ILLUMINANCE, &val); | 129 | ret = acpi_als_read_value(als, ACPI_ALS_ILLUMINANCE, &val); |
130 | if (ret < 0) | 130 | if (ret < 0) |
131 | goto out; | 131 | goto out; |
132 | *buffer++ = val; | 132 | *buffer++ = val; |
@@ -159,7 +159,7 @@ static int acpi_als_read_raw(struct iio_dev *indio_dev, | |||
159 | if (chan->type != IIO_LIGHT) | 159 | if (chan->type != IIO_LIGHT) |
160 | return -EINVAL; | 160 | return -EINVAL; |
161 | 161 | ||
162 | ret = als_read_value(als, ACPI_ALS_ILLUMINANCE, &temp_val); | 162 | ret = acpi_als_read_value(als, ACPI_ALS_ILLUMINANCE, &temp_val); |
163 | if (ret < 0) | 163 | if (ret < 0) |
164 | return ret; | 164 | return ret; |
165 | 165 | ||