Loading drivers/acpi/battery.c +5 −7 Original line number Original line Diff line number Diff line Loading @@ -832,14 +832,12 @@ static int acpi_battery_add(struct acpi_device *device) acpi_battery_update(battery); acpi_battery_update(battery); #ifdef CONFIG_ACPI_PROCFS_POWER #ifdef CONFIG_ACPI_PROCFS_POWER result = acpi_battery_add_fs(device); result = acpi_battery_add_fs(device); if (result) goto end; #endif #endif if (!result) { printk(KERN_INFO PREFIX "%s Slot [%s] (battery %s)\n", printk(KERN_INFO PREFIX "%s Slot [%s] (battery %s)\n", ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device), ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device), device->status.battery_present ? "present" : "absent"); device->status.battery_present ? "present" : "absent"); end: } else { if (result) { #ifdef CONFIG_ACPI_PROCFS_POWER #ifdef CONFIG_ACPI_PROCFS_POWER acpi_battery_remove_fs(device); acpi_battery_remove_fs(device); #endif #endif Loading Loading
drivers/acpi/battery.c +5 −7 Original line number Original line Diff line number Diff line Loading @@ -832,14 +832,12 @@ static int acpi_battery_add(struct acpi_device *device) acpi_battery_update(battery); acpi_battery_update(battery); #ifdef CONFIG_ACPI_PROCFS_POWER #ifdef CONFIG_ACPI_PROCFS_POWER result = acpi_battery_add_fs(device); result = acpi_battery_add_fs(device); if (result) goto end; #endif #endif if (!result) { printk(KERN_INFO PREFIX "%s Slot [%s] (battery %s)\n", printk(KERN_INFO PREFIX "%s Slot [%s] (battery %s)\n", ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device), ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device), device->status.battery_present ? "present" : "absent"); device->status.battery_present ? "present" : "absent"); end: } else { if (result) { #ifdef CONFIG_ACPI_PROCFS_POWER #ifdef CONFIG_ACPI_PROCFS_POWER acpi_battery_remove_fs(device); acpi_battery_remove_fs(device); #endif #endif Loading