Commit 3dd2fcf4 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'acpi-video', 'acpi-resource', 'acpi-pad' and 'acpi-misc'

Merge ACPI backlight (video) driver update, ACPI resource management
updates, an ACPI processor aggregator device (PAD) driver fix, and
miscellaneous ACPI updates for 6.12-rc1:

 - Add force_vendor quirk for Panasonic Toughbook CF-18 in the ACPI
   backlight driver (Hans de Goede).

 - Make the DMI checks related to backlight handling on Lenovo Yoga
   Tab 3 X90F less strict (Hans de Goede).

 - Enforce native backlight handling on Apple MacbookPro9,2 (Esther
   Shimanovich).

 - Add IRQ override quirks for Asus Vivobook Go E1404GAB and MECHREV
   GM7XG0M, and refine the TongFang GMxXGxx quirk (Li Chen, Tamim Khan,
   Werner Sembach).

 - Fix crash in exit_round_robin() in the ACPI processor aggregator
   device (PAD) driver (Seiji Nishikawa).

 - Define and use symbols for device and class name lengths in the ACPI
   bus type code and make the code use strscpy() instead of strcpy() in
   several places (Muhammad Qasim Abdul Majeed).

* acpi-video:
  ACPI: video: Add force_vendor quirk for Panasonic Toughbook CF-18
  ACPI: x86: Make Lenovo Yoga Tab 3 X90F DMI match less strict
  ACPI: video: Make Lenovo Yoga Tab 3 X90F DMI match less strict
  ACPI: video: force native for Apple MacbookPro9,2

* acpi-resource:
  ACPI: resource: Add another DMI match for the TongFang GMxXGxx
  ACPI: resource: Skip IRQ override on Asus Vivobook Go E1404GAB
  ACPI: resource: Do IRQ override on MECHREV GM7XG0M

* acpi-pad:
  ACPI: PAD: fix crash in exit_round_robin()

* acpi-misc:
  ACPI: button: Use strscpy() instead of strcpy()
  ACPI: bus: Define and use symbols for device and class name lengths
  ACPI: battery : Use strscpy() instead of strcpy()
  ACPI: acpi_processor: Use strscpy instead() of strcpy()
  ACPI: PAD: Use strscpy() instead of strcpy()
  ACPI: AC: Use strscpy() instead of strcpy()
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -213,8 +213,8 @@ static int acpi_ac_probe(struct platform_device *pdev)
		return -ENOMEM;

	ac->device = adev;
	strcpy(acpi_device_name(adev), ACPI_AC_DEVICE_NAME);
	strcpy(acpi_device_class(adev), ACPI_AC_CLASS);
	strscpy(acpi_device_name(adev), ACPI_AC_DEVICE_NAME);
	strscpy(acpi_device_class(adev), ACPI_AC_CLASS);

	platform_set_drvdata(pdev, ac);

+6 −4
Original line number Diff line number Diff line
@@ -136,9 +136,11 @@ static void exit_round_robin(unsigned int tsk_index)
{
	struct cpumask *pad_busy_cpus = to_cpumask(pad_busy_cpus_bits);

	if (tsk_in_cpu[tsk_index] != -1) {
		cpumask_clear_cpu(tsk_in_cpu[tsk_index], pad_busy_cpus);
		tsk_in_cpu[tsk_index] = -1;
	}
}

static unsigned int idle_pct = 5; /* percentage */
static unsigned int round_robin_time = 1; /* second */
@@ -428,8 +430,8 @@ static int acpi_pad_probe(struct platform_device *pdev)
	struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
	acpi_status status;

	strcpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME);
	strcpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS);
	strscpy(acpi_device_name(adev), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME);
	strscpy(acpi_device_class(adev), ACPI_PROCESSOR_AGGREGATOR_CLASS);

	status = acpi_install_notify_handler(adev->handle,
		ACPI_DEVICE_NOTIFY, acpi_pad_notify, adev);
+2 −2
Original line number Diff line number Diff line
@@ -436,8 +436,8 @@ static int acpi_processor_add(struct acpi_device *device,
	}

	pr->handle = device->handle;
	strcpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME);
	strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS);
	strscpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME);
	strscpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS);
	device->driver_data = pr;

	result = acpi_processor_get_info(device);
+3 −3
Original line number Diff line number Diff line
@@ -547,20 +547,20 @@ static int acpi_button_add(struct acpi_device *device)
	    !strcmp(hid, ACPI_BUTTON_HID_POWERF)) {
		button->type = ACPI_BUTTON_TYPE_POWER;
		handler = acpi_button_notify;
		strcpy(name, ACPI_BUTTON_DEVICE_NAME_POWER);
		strscpy(name, ACPI_BUTTON_DEVICE_NAME_POWER, MAX_ACPI_DEVICE_NAME_LEN);
		sprintf(class, "%s/%s",
			ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_POWER);
	} else if (!strcmp(hid, ACPI_BUTTON_HID_SLEEP) ||
		   !strcmp(hid, ACPI_BUTTON_HID_SLEEPF)) {
		button->type = ACPI_BUTTON_TYPE_SLEEP;
		handler = acpi_button_notify;
		strcpy(name, ACPI_BUTTON_DEVICE_NAME_SLEEP);
		strscpy(name, ACPI_BUTTON_DEVICE_NAME_SLEEP, MAX_ACPI_DEVICE_NAME_LEN);
		sprintf(class, "%s/%s",
			ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_SLEEP);
	} else if (!strcmp(hid, ACPI_BUTTON_HID_LID)) {
		button->type = ACPI_BUTTON_TYPE_LID;
		handler = acpi_lid_notify;
		strcpy(name, ACPI_BUTTON_DEVICE_NAME_LID);
		strscpy(name, ACPI_BUTTON_DEVICE_NAME_LID, MAX_ACPI_DEVICE_NAME_LEN);
		sprintf(class, "%s/%s",
			ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID);
		input->open = acpi_lid_input_open;
+19 −0
Original line number Diff line number Diff line
@@ -503,6 +503,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
			DMI_MATCH(DMI_BOARD_NAME, "B2502FBA"),
		},
	},
	{
		/* Asus Vivobook Go E1404GAB */
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_BOARD_NAME, "E1404GAB"),
		},
	},
	{
		/* Asus Vivobook E1504GA */
		.matches = {
@@ -554,6 +561,12 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
 * to have a working keyboard.
 */
static const struct dmi_system_id irq1_edge_low_force_override[] = {
	{
		/* MECHREV Jiaolong17KS Series GM7XG0M */
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "GM7XG0M"),
		},
	},
	{
		/* XMG APEX 17 (M23) */
		.matches = {
@@ -572,6 +585,12 @@ static const struct dmi_system_id irq1_edge_low_force_override[] = {
			DMI_MATCH(DMI_BOARD_NAME, "GMxXGxx"),
		},
	},
	{
		/* TongFang GMxXGxX/TUXEDO Polaris 15 Gen5 AMD */
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "GMxXGxX"),
		},
	},
	{
		/* TongFang GMxXGxx sold as Eluktronics Inc. RP-15 */
		.matches = {
Loading