@@ -120,11 +120,11 @@ static enum power_supply_property ac_props[] = {
120
120
static void acpi_ac_notify (acpi_handle handle , u32 event , void * data )
121
121
{
122
122
struct acpi_ac * ac = data ;
123
- struct acpi_device * device = ac -> device ;
123
+ struct acpi_device * adev = ac -> device ;
124
124
125
125
switch (event ) {
126
126
default :
127
- acpi_handle_debug (device -> handle , "Unsupported event [0x%x]\n" ,
127
+ acpi_handle_debug (adev -> handle , "Unsupported event [0x%x]\n" ,
128
128
event );
129
129
fallthrough ;
130
130
case ACPI_AC_NOTIFY_STATUS :
@@ -141,10 +141,10 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
141
141
msleep (ac_sleep_before_get_state_ms );
142
142
143
143
acpi_ac_get_state (ac );
144
- acpi_bus_generate_netlink_event (device -> pnp .device_class ,
145
- dev_name (& device -> dev ), event ,
144
+ acpi_bus_generate_netlink_event (adev -> pnp .device_class ,
145
+ dev_name (& adev -> dev ), event ,
146
146
(u32 ) ac -> state );
147
- acpi_notifier_call_chain (device , event , (u32 ) ac -> state );
147
+ acpi_notifier_call_chain (adev , event , (u32 ) ac -> state );
148
148
kobject_uevent (& ac -> charger -> dev .kobj , KOBJ_CHANGE );
149
149
}
150
150
}
@@ -203,7 +203,7 @@ static const struct dmi_system_id ac_dmi_table[] __initconst = {
203
203
204
204
static int acpi_ac_probe (struct platform_device * pdev )
205
205
{
206
- struct acpi_device * device = ACPI_COMPANION (& pdev -> dev );
206
+ struct acpi_device * adev = ACPI_COMPANION (& pdev -> dev );
207
207
struct power_supply_config psy_cfg = {};
208
208
struct acpi_ac * ac ;
209
209
int result ;
@@ -212,9 +212,9 @@ static int acpi_ac_probe(struct platform_device *pdev)
212
212
if (!ac )
213
213
return - ENOMEM ;
214
214
215
- ac -> device = device ;
216
- strcpy (acpi_device_name (device ), ACPI_AC_DEVICE_NAME );
217
- strcpy (acpi_device_class (device ), ACPI_AC_CLASS );
215
+ ac -> device = adev ;
216
+ strcpy (acpi_device_name (adev ), ACPI_AC_DEVICE_NAME );
217
+ strcpy (acpi_device_class (adev ), ACPI_AC_CLASS );
218
218
219
219
platform_set_drvdata (pdev , ac );
220
220
@@ -224,7 +224,7 @@ static int acpi_ac_probe(struct platform_device *pdev)
224
224
225
225
psy_cfg .drv_data = ac ;
226
226
227
- ac -> charger_desc .name = acpi_device_bid (device );
227
+ ac -> charger_desc .name = acpi_device_bid (adev );
228
228
ac -> charger_desc .type = POWER_SUPPLY_TYPE_MAINS ;
229
229
ac -> charger_desc .properties = ac_props ;
230
230
ac -> charger_desc .num_properties = ARRAY_SIZE (ac_props );
@@ -236,13 +236,13 @@ static int acpi_ac_probe(struct platform_device *pdev)
236
236
goto err_release_ac ;
237
237
}
238
238
239
- pr_info ("%s [%s] (%s-line)\n" , acpi_device_name (device ),
240
- acpi_device_bid (device ), str_on_off (ac -> state ));
239
+ pr_info ("%s [%s] (%s-line)\n" , acpi_device_name (adev ),
240
+ acpi_device_bid (adev ), str_on_off (ac -> state ));
241
241
242
242
ac -> battery_nb .notifier_call = acpi_ac_battery_notify ;
243
243
register_acpi_notifier (& ac -> battery_nb );
244
244
245
- result = acpi_dev_install_notify_handler (device , ACPI_ALL_NOTIFY ,
245
+ result = acpi_dev_install_notify_handler (adev , ACPI_ALL_NOTIFY ,
246
246
acpi_ac_notify , ac );
247
247
if (result )
248
248
goto err_unregister ;
0 commit comments