Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb1d97a2 authored by Frans Klaver's avatar Frans Klaver Committed by Darren Hart
Browse files

eeepc-laptop: clean up control flow in eeepc_acpi_notify



eeepc_acpi_notify increases the indentation level to a whopping four. If
we revise the conditions a bit, we can reduce that to a more soothing
two and satisfy the indentation guidelines in Documentation/CodingStyle.

Remove an unwanted space while we're in the neighbourhood.

Signed-off-by: default avatarFrans Klaver <fransklaver@gmail.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent 049db626
Loading
Loading
Loading
Loading
+26 −27
Original line number Diff line number Diff line
@@ -1242,6 +1242,7 @@ static void eeepc_input_notify(struct eeepc_laptop *eeepc, int event)
static void eeepc_acpi_notify(struct acpi_device *device, u32 event)
{
	struct eeepc_laptop *eeepc = acpi_driver_data(device);
	int old_brightness, new_brightness;
	u16 count;

	if (event > ACPI_MAX_SYS_NOTIFY)
@@ -1252,11 +1253,14 @@ static void eeepc_acpi_notify(struct acpi_device *device, u32 event)
					count);

	/* Brightness events are special */
	if (event >= NOTIFY_BRN_MIN && event <= NOTIFY_BRN_MAX) {
	if (event < NOTIFY_BRN_MIN || event > NOTIFY_BRN_MAX) {
		eeepc_input_notify(eeepc, event);
		return;
	}

	/* Ignore them completely if the acpi video driver is used */
		if (eeepc->backlight_device != NULL) {
			int old_brightness, new_brightness;
	if (!eeepc->backlight_device)
		return;

	/* Update the backlight device. */
	old_brightness = eeepc_backlight_notify(eeepc);
@@ -1276,11 +1280,6 @@ static void eeepc_acpi_notify(struct acpi_device *device, u32 event)
	}
	eeepc_input_notify(eeepc, event);
}
	} else {
		/* Everything else is a bona-fide keypress event */
		eeepc_input_notify(eeepc, event);
	}
}

static void eeepc_dmi_check(struct eeepc_laptop *eeepc)
{