Skip to content

Commit fb4b67c

Browse files
Wer-Wolfij-intel
authored andcommitted
platform/x86: uniwill-laptop: Fix behavior of "force" module param
Users might want to force-enable all possible features even on machines with a valid device descriptor. Until now the "force" module param was ignored on such machines. Fix this to make it easier to test for support of new features. Fixes: d050479 ("platform/x86: Add Uniwill laptop driver") Reviewed-by: Werner Sembach <wse@tuxedocomputers.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20260512232145.329260-4-W_Armin@gmx.de Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent c16a482 commit fb4b67c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/platform/x86/uniwill/uniwill-acpi.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,8 +2489,6 @@ static int __init uniwill_init(void)
24892489
if (!force)
24902490
return -ENODEV;
24912491

2492-
/* Assume that the device supports all features */
2493-
device_descriptor.features = UINT_MAX;
24942492
pr_warn("Loading on a potentially unsupported device\n");
24952493
} else {
24962494
/*
@@ -2508,6 +2506,12 @@ static int __init uniwill_init(void)
25082506
device_descriptor = *descriptor;
25092507
}
25102508

2509+
if (force) {
2510+
/* Assume that the device supports all features */
2511+
device_descriptor.features = UINT_MAX;
2512+
pr_warn("Enabling potentially unsupported features\n");
2513+
}
2514+
25112515
ret = platform_driver_register(&uniwill_driver);
25122516
if (ret < 0)
25132517
return ret;

0 commit comments

Comments
 (0)