@@ -65,20 +65,20 @@ static const struct iio_chan_spec acpi_als_channels[] = {
65
65
* to acpi_als_channels[], the evt_buffer below will grow
66
66
* automatically.
67
67
*/
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)))
71
71
72
72
struct acpi_als {
73
73
struct acpi_device * device ;
74
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
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
82
* special.
83
83
*
84
84
* The _ALR property returns tables that can be used to fine-tune the values
@@ -93,7 +93,7 @@ struct acpi_als {
93
93
#define ACPI_ALS_POLLING "_ALP"
94
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
98
unsigned long long temp_val ;
99
99
acpi_status status ;
@@ -122,11 +122,11 @@ static void acpi_als_notify(struct acpi_device *device, u32 event)
122
122
123
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
127
switch (event ) {
128
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
130
if (ret < 0 )
131
131
goto out ;
132
132
* buffer ++ = val ;
@@ -159,7 +159,7 @@ static int acpi_als_read_raw(struct iio_dev *indio_dev,
159
159
if (chan -> type != IIO_LIGHT )
160
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
163
if (ret < 0 )
164
164
return ret ;
165
165
0 commit comments