mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
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()
This commit is contained in:
commit
3dd2fcf496
@ -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);
|
||||
|
||||
|
@ -136,8 +136,10 @@ static void exit_round_robin(unsigned int tsk_index)
|
||||
{
|
||||
struct cpumask *pad_busy_cpus = to_cpumask(pad_busy_cpus_bits);
|
||||
|
||||
cpumask_clear_cpu(tsk_in_cpu[tsk_index], pad_busy_cpus);
|
||||
tsk_in_cpu[tsk_index] = -1;
|
||||
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 */
|
||||
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 = {
|
||||
|
@ -254,6 +254,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "PCG-FRV35"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_vendor,
|
||||
/* Panasonic Toughbook CF-18 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Matsushita Electric Industrial"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"),
|
||||
},
|
||||
},
|
||||
|
||||
/*
|
||||
* Toshiba models with Transflective display, these need to use
|
||||
@ -549,6 +557,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir9,1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
/* Apple MacBook Pro 9,2 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9,2"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */
|
||||
.callback = video_detect_force_native,
|
||||
@ -896,7 +912,6 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
/* Lenovo Yoga Tab 3 Pro YT3-X90F */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
|
||||
},
|
||||
},
|
||||
|
@ -355,7 +355,6 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
|
||||
/* Lenovo Yoga Tab 3 Pro X90F */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
|
||||
},
|
||||
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
|
||||
|
@ -228,10 +228,12 @@ struct acpi_device_dir {
|
||||
|
||||
/* Plug and Play */
|
||||
|
||||
#define MAX_ACPI_DEVICE_NAME_LEN 40
|
||||
#define MAX_ACPI_CLASS_NAME_LEN 20
|
||||
typedef char acpi_bus_id[8];
|
||||
typedef u64 acpi_bus_address;
|
||||
typedef char acpi_device_name[40];
|
||||
typedef char acpi_device_class[20];
|
||||
typedef char acpi_device_name[MAX_ACPI_DEVICE_NAME_LEN];
|
||||
typedef char acpi_device_class[MAX_ACPI_CLASS_NAME_LEN];
|
||||
|
||||
struct acpi_hardware_id {
|
||||
struct list_head list;
|
||||
|
Loading…
Reference in New Issue
Block a user