Unverified Commit fb4b67c4 authored by Armin Wolf's avatar Armin Wolf Committed by Ilpo Järvinen
Browse files

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: d0504796 ("platform/x86: Add Uniwill laptop driver")
Reviewed-by: default avatarWerner Sembach <wse@tuxedocomputers.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20260512232145.329260-4-W_Armin@gmx.de


Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent c16a4823
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2489,8 +2489,6 @@ static int __init uniwill_init(void)
		if (!force)
			return -ENODEV;

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

	if (force) {
		/* Assume that the device supports all features */
		device_descriptor.features = UINT_MAX;
		pr_warn("Enabling potentially unsupported features\n");
	}

	ret = platform_driver_register(&uniwill_driver);
	if (ret < 0)
		return ret;