Skip to content

Commit 2363331

Browse files
Hartmut Knaackjic23
authored andcommitted
iio:light:acpi-als: add missing prefixes
Some macros and a function were missing the acpi_als_ prefix, so add it. Signed-off-by: Hartmut Knaack <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 829aed1 commit 2363331

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/iio/light/acpi-als.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ static const struct iio_chan_spec acpi_als_channels[] = {
6565
* to acpi_als_channels[], the evt_buffer below will grow
6666
* automatically.
6767
*/
68-
#define EVT_NR_SOURCES ARRAY_SIZE(acpi_als_channels)
69-
#define EVT_BUFFER_SIZE \
70-
(sizeof(s64) + (EVT_NR_SOURCES * sizeof(s32)))
68+
#define ACPI_ALS_EVT_NR_SOURCES ARRAY_SIZE(acpi_als_channels)
69+
#define ACPI_ALS_EVT_BUFFER_SIZE \
70+
(sizeof(s64) + (ACPI_ALS_EVT_NR_SOURCES * sizeof(s32)))
7171

7272
struct acpi_als {
7373
struct acpi_device *device;
7474
struct mutex lock;
7575

76-
s32 evt_buffer[EVT_BUFFER_SIZE];
76+
s32 evt_buffer[ACPI_ALS_EVT_BUFFER_SIZE];
7777
};
7878

7979
/*
8080
* 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
8282
* special.
8383
*
8484
* The _ALR property returns tables that can be used to fine-tune the values
@@ -93,7 +93,7 @@ struct acpi_als {
9393
#define ACPI_ALS_POLLING "_ALP"
9494
#define ACPI_ALS_TABLES "_ALR"
9595

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)
9797
{
9898
unsigned long long temp_val;
9999
acpi_status status;
@@ -122,11 +122,11 @@ static void acpi_als_notify(struct acpi_device *device, u32 event)
122122

123123
mutex_lock(&als->lock);
124124

125-
memset(buffer, 0, EVT_BUFFER_SIZE);
125+
memset(buffer, 0, ACPI_ALS_EVT_BUFFER_SIZE);
126126

127127
switch (event) {
128128
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);
130130
if (ret < 0)
131131
goto out;
132132
*buffer++ = val;
@@ -159,7 +159,7 @@ static int acpi_als_read_raw(struct iio_dev *indio_dev,
159159
if (chan->type != IIO_LIGHT)
160160
return -EINVAL;
161161

162-
ret = als_read_value(als, ACPI_ALS_ILLUMINANCE, &temp_val);
162+
ret = acpi_als_read_value(als, ACPI_ALS_ILLUMINANCE, &temp_val);
163163
if (ret < 0)
164164
return ret;
165165

0 commit comments

Comments
 (0)