Fixes priority mistakes similar to '!x & y' Signed-off-by: Roel Kluin <12o3l@xxxxxxxxxx> --- diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 9b2c0f7..3762ce2 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -420,8 +420,7 @@ static int acpi_battery_update(struct acpi_battery *battery, result = acpi_battery_get_status(battery); if (result) goto end; - if ((!battery->flags.battery_present_prev & acpi_battery_present(battery)) - || (battery->flags.battery_present_prev & !acpi_battery_present(battery))) { + if (battery->flags.battery_present_prev != acpi_battery_present(battery)) { result = acpi_battery_init_update(battery); if (result) goto end; @@ -448,10 +447,7 @@ static void acpi_battery_notify_update(struct acpi_battery *battery) return; } - if ((!battery->flags.battery_present_prev & - acpi_battery_present(battery)) || - (battery->flags.battery_present_prev & - !acpi_battery_present(battery))) { + if (battery->flags.battery_present_prev != acpi_battery_present(battery)) { battery->flags.init_update = 1; } else { battery->flags.update[ACPI_BATTERY_INFO] = 1; - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html