Lines Matching refs:bat
103 struct power_supply *bat; member
695 hook->remove_battery(battery->bat); in __battery_hook_unregister()
723 if (hook->add_battery(battery->bat)) { in battery_hook_register()
761 if (hook_node->add_battery(battery->bat)) { in battery_hook_add_battery()
784 hook->remove_battery(battery->bat); in battery_hook_remove_battery()
843 battery->bat = power_supply_register_no_ws(&battery->device->dev, in sysfs_add_battery()
846 if (IS_ERR(battery->bat)) { in sysfs_add_battery()
847 int result = PTR_ERR(battery->bat); in sysfs_add_battery()
849 battery->bat = NULL; in sysfs_add_battery()
853 return device_create_file(&battery->bat->dev, &alarm_attr); in sysfs_add_battery()
859 if (!battery->bat) { in sysfs_remove_battery()
864 device_remove_file(&battery->bat->dev, &alarm_attr); in sysfs_remove_battery()
865 power_supply_unregister(battery->bat); in sysfs_remove_battery()
866 battery->bat = NULL; in sysfs_remove_battery()
978 if (!battery->bat) { in acpi_battery_update()
1000 if (!battery->bat) in acpi_battery_refresh()
1026 old = battery->bat; in acpi_battery_notify()
1043 if (old && battery->bat) in acpi_battery_notify()
1044 power_supply_changed(battery->bat); in acpi_battery_notify()
1060 if (battery->bat) { in battery_notify()