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

Commit 915ea7e4 authored by Felipe Contreras's avatar Felipe Contreras Committed by Rafael J. Wysocki
Browse files

ACPI / video: trivial style cleanups



Fix several coding style defects in drivers/acpi/video.c:
 - Initialization of static variables.
 - Whitespace in expressions, variable definitions, function
   headers, etc.
 - Positioning of labels.
 - Braces around single statements.

[rjw: Changelog]
Signed-off-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 21fcb34e
Loading
Loading
Loading
Loading
+35 −45
Original line number Original line Diff line number Diff line
@@ -88,7 +88,7 @@ module_param(allow_duplicates, bool, 0644);
static bool use_bios_initial_backlight = 1;
static bool use_bios_initial_backlight = 1;
module_param(use_bios_initial_backlight, bool, 0644);
module_param(use_bios_initial_backlight, bool, 0644);


static int register_count = 0;
static int register_count;
static int acpi_video_bus_add(struct acpi_device *device);
static int acpi_video_bus_add(struct acpi_device *device);
static int acpi_video_bus_remove(struct acpi_device *device);
static int acpi_video_bus_remove(struct acpi_device *device);
static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
@@ -892,15 +892,12 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
{
{
	acpi_handle h_dummy1;
	acpi_handle h_dummy1;


	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_ADR", &h_dummy1))) {
	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_ADR", &h_dummy1)))
		device->cap._ADR = 1;
		device->cap._ADR = 1;
	}
	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCL", &h_dummy1)))
	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCL", &h_dummy1))) {
		device->cap._BCL = 1;
		device->cap._BCL = 1;
	}
	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCM", &h_dummy1)))
	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCM", &h_dummy1))) {
		device->cap._BCM = 1;
		device->cap._BCM = 1;
	}
	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BQC", &h_dummy1)))
	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BQC", &h_dummy1)))
		device->cap._BQC = 1;
		device->cap._BQC = 1;
	else if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCQ",
	else if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCQ",
@@ -909,9 +906,8 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
		device->cap._BCQ = 1;
		device->cap._BCQ = 1;
	}
	}


	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DDC", &h_dummy1))) {
	if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DDC", &h_dummy1)))
		device->cap._DDC = 1;
		device->cap._DDC = 1;
	}


	if (acpi_video_init_brightness(device))
	if (acpi_video_init_brightness(device))
		return;
		return;
@@ -922,7 +918,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
		acpi_handle acpi_parent;
		acpi_handle acpi_parent;
		struct device *parent = NULL;
		struct device *parent = NULL;
		int result;
		int result;
		static int count = 0;
		static int count;
		char *name;
		char *name;


		name = kasprintf(GFP_KERNEL, "acpi_video%d", count);
		name = kasprintf(GFP_KERNEL, "acpi_video%d", count);
@@ -1006,25 +1002,19 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video)
{
{
	acpi_handle h_dummy1;
	acpi_handle h_dummy1;


	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", &h_dummy1))) {
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", &h_dummy1)))
		video->cap._DOS = 1;
		video->cap._DOS = 1;
	}
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOD", &h_dummy1)))
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOD", &h_dummy1))) {
		video->cap._DOD = 1;
		video->cap._DOD = 1;
	}
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_ROM", &h_dummy1)))
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_ROM", &h_dummy1))) {
		video->cap._ROM = 1;
		video->cap._ROM = 1;
	}
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_GPD", &h_dummy1)))
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_GPD", &h_dummy1))) {
		video->cap._GPD = 1;
		video->cap._GPD = 1;
	}
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_SPD", &h_dummy1)))
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_SPD", &h_dummy1))) {
		video->cap._SPD = 1;
		video->cap._SPD = 1;
	}
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_VPO", &h_dummy1)))
	if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_VPO", &h_dummy1))) {
		video->cap._VPO = 1;
		video->cap._VPO = 1;
}
}
}


/*
/*
 * Check whether the video bus device has required AML method to
 * Check whether the video bus device has required AML method to
@@ -1142,7 +1132,7 @@ acpi_video_bus_get_one_device(struct acpi_device *device,


	attribute = acpi_video_get_device_attr(video, device_id);
	attribute = acpi_video_get_device_attr(video, device_id);


	if((attribute != NULL) && attribute->device_id_scheme) {
	if (attribute && attribute->device_id_scheme) {
		switch (attribute->display_type) {
		switch (attribute->display_type) {
		case ACPI_VIDEO_DISPLAY_CRT:
		case ACPI_VIDEO_DISPLAY_CRT:
			data->flags.crt = 1;
			data->flags.crt = 1;