]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: GPD pocket fan: Use default values when wrong modparams are given
authorHans de Goede <hdegoede@redhat.com>
Mon, 6 Jan 2020 14:42:18 +0000 (15:42 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 10 Jan 2020 09:57:22 +0000 (11:57 +0200)
commit842588fea62f88cf978134b5cbb33fafd55c324b
treefa665f7cfe09ec2d1b01c96efc39b1aff28e7dd2
parent8add1a14aa4dcf609e8a1ae375ca50d3a8382309
platform/x86: GPD pocket fan: Use default values when wrong modparams are given

Use our default values when wrong module-parameters are given, instead of
refusing to load. Refusing to load leaves the fan at the BIOS default
setting, which is "Off". The CPU's thermal throttling should protect the
system from damage, but not-loading is really not the best fallback in this
case.

This commit fixes this by re-setting module-parameter values to their
defaults if they are out of range, instead of failing the probe with
-EINVAL.

Cc: stable@vger.kernel.org
Cc: Jason Anderson <jasona.594@gmail.com>
Reported-by: Jason Anderson <jasona.594@gmail.com>
Fixes: ba9b5ca8bda0 ("platform/x86: GPD pocket fan: Use a min-speed of 2 while charging")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/gpd-pocket-fan.c