Lines Matching refs:bat
55 struct power_supply *bat; member
534 battery->bat = power_supply_register(&sbs->device->dev, in acpi_battery_add()
536 if (IS_ERR(battery->bat)) { in acpi_battery_add()
537 result = PTR_ERR(battery->bat); in acpi_battery_add()
538 battery->bat = NULL; in acpi_battery_add()
542 result = device_create_file(&battery->bat->dev, &alarm_attr); in acpi_battery_add()
557 if (battery->bat) { in acpi_battery_remove()
559 device_remove_file(&battery->bat->dev, &alarm_attr); in acpi_battery_remove()
560 power_supply_unregister(battery->bat); in acpi_battery_remove()
597 struct acpi_battery *bat; in acpi_sbs_callback() local
611 bat = &sbs->battery[id]; in acpi_sbs_callback()
612 saved_battery_state = bat->present; in acpi_sbs_callback()
613 acpi_battery_read(bat); in acpi_sbs_callback()
614 if (saved_battery_state == bat->present) in acpi_sbs_callback()
616 kobject_uevent(&bat->bat->dev.kobj, KOBJ_CHANGE); in acpi_sbs_callback()