Skip to content

Commit 2d19be0

Browse files
committed
Merge tag 'platform-drivers-x86-v6.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fix from Hans de Goede: - Fix regression in toshiba_acpi introduced in 6.10-rc1 * tag 'platform-drivers-x86-v6.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: toshiba_acpi: Fix quickstart quirk handling
2 parents 4d85ace + e527a61 commit 2d19be0

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

drivers/platform/x86/toshiba_acpi.c

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3271,7 +3271,7 @@ static const char *find_hci_method(acpi_handle handle)
32713271
*/
32723272
#define QUIRK_HCI_HOTKEY_QUICKSTART BIT(1)
32733273

3274-
static const struct dmi_system_id toshiba_dmi_quirks[] = {
3274+
static const struct dmi_system_id toshiba_dmi_quirks[] __initconst = {
32753275
{
32763276
/* Toshiba Portégé R700 */
32773277
/* https://bugzilla.kernel.org/show_bug.cgi?id=21012 */
@@ -3306,8 +3306,6 @@ static int toshiba_acpi_add(struct acpi_device *acpi_dev)
33063306
struct toshiba_acpi_dev *dev;
33073307
const char *hci_method;
33083308
u32 dummy;
3309-
const struct dmi_system_id *dmi_id;
3310-
long quirks = 0;
33113309
int ret = 0;
33123310

33133311
if (toshiba_acpi)
@@ -3460,16 +3458,6 @@ static int toshiba_acpi_add(struct acpi_device *acpi_dev)
34603458
}
34613459
#endif
34623460

3463-
dmi_id = dmi_first_match(toshiba_dmi_quirks);
3464-
if (dmi_id)
3465-
quirks = (long)dmi_id->driver_data;
3466-
3467-
if (turn_on_panel_on_resume == -1)
3468-
turn_on_panel_on_resume = !!(quirks & QUIRK_TURN_ON_PANEL_ON_RESUME);
3469-
3470-
if (hci_hotkey_quickstart == -1)
3471-
hci_hotkey_quickstart = !!(quirks & QUIRK_HCI_HOTKEY_QUICKSTART);
3472-
34733461
toshiba_wwan_available(dev);
34743462
if (dev->wwan_supported)
34753463
toshiba_acpi_setup_wwan_rfkill(dev);
@@ -3618,10 +3606,27 @@ static struct acpi_driver toshiba_acpi_driver = {
36183606
.drv.pm = &toshiba_acpi_pm,
36193607
};
36203608

3609+
static void __init toshiba_dmi_init(void)
3610+
{
3611+
const struct dmi_system_id *dmi_id;
3612+
long quirks = 0;
3613+
3614+
dmi_id = dmi_first_match(toshiba_dmi_quirks);
3615+
if (dmi_id)
3616+
quirks = (long)dmi_id->driver_data;
3617+
3618+
if (turn_on_panel_on_resume == -1)
3619+
turn_on_panel_on_resume = !!(quirks & QUIRK_TURN_ON_PANEL_ON_RESUME);
3620+
3621+
if (hci_hotkey_quickstart == -1)
3622+
hci_hotkey_quickstart = !!(quirks & QUIRK_HCI_HOTKEY_QUICKSTART);
3623+
}
3624+
36213625
static int __init toshiba_acpi_init(void)
36223626
{
36233627
int ret;
36243628

3629+
toshiba_dmi_init();
36253630
toshiba_proc_dir = proc_mkdir(PROC_TOSHIBA, acpi_root_dir);
36263631
if (!toshiba_proc_dir) {
36273632
pr_err("Unable to create proc dir " PROC_TOSHIBA "\n");

0 commit comments

Comments
 (0)