]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
platform/x86: fujitsu: use unsigned int for kstrtounit
authorJelle van der Waa <jvanderwaa@redhat.com>
Mon, 9 Jun 2025 10:21:13 +0000 (12:21 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 13 Jun 2025 09:33:26 +0000 (12:33 +0300)
The charge control threshold value ranges from 0-100.

Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Acked-by: Jonathan Woithe <jwoithe@just42.net>
Link: https://lore.kernel.org/r/20250609102115.36936-2-jvanderwaa@redhat.com
[ij: use reverse xmas-tree order]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/fujitsu-laptop.c

index 162809140f68a21f0bbc2b26fc0be876da843c98..c6ec61518160bbac84e7e256f4e89fd20938f6c2 100644 (file)
@@ -180,7 +180,8 @@ static ssize_t charge_control_end_threshold_store(struct device *dev,
                                const char *buf, size_t count)
 {
        int cc_end_value, s006_cc_return;
-       int value, ret;
+       unsigned int value;
+       int ret;
 
        ret = kstrtouint(buf, 10, &value);
        if (ret)