]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
platform/x86: fujitsu-laptop: rename call_fext_func() arguments
authorMichał Kępień <kernel@kempniu.pl>
Mon, 3 Apr 2017 09:38:59 +0000 (11:38 +0200)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 13 Apr 2017 17:14:36 +0000 (10:14 -0700)
Rename call_fext_func() arguments so that each argument's name signifies
its role:

  - cmd -> func: sub-function to call (flags, buttons etc.),
  - arg0 -> op: operation to perform (get, set, get capabilities etc.),
  - arg1 -> feature: feature to act on (e.g. which LED), if relevant,
  - arg2 -> state: state to set (e.g. LED on or off), if relevant.

Adjust whitespace to make checkpatch happy.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/fujitsu-laptop.c

index e5413d268b24f5ef3d69e1cd81312d8bedba7e5b..26149f58dba7f68502205f0f4c23e1a91a981d8e 100644 (file)
@@ -217,13 +217,13 @@ static u32 dbg_level = 0x03;
 
 /* Fujitsu ACPI interface function */
 
-static int call_fext_func(int cmd, int arg0, int arg1, int arg2)
+static int call_fext_func(int func, int op, int feature, int state)
 {
        union acpi_object params[4] = {
-               { .integer.type = ACPI_TYPE_INTEGER, .integer.value = cmd },
-               { .integer.type = ACPI_TYPE_INTEGER, .integer.value = arg0 },
-               { .integer.type = ACPI_TYPE_INTEGER, .integer.value = arg1 },
-               { .integer.type = ACPI_TYPE_INTEGER, .integer.value = arg2 }
+               { .integer.type = ACPI_TYPE_INTEGER, .integer.value = func },
+               { .integer.type = ACPI_TYPE_INTEGER, .integer.value = op },
+               { .integer.type = ACPI_TYPE_INTEGER, .integer.value = feature },
+               { .integer.type = ACPI_TYPE_INTEGER, .integer.value = state }
        };
        struct acpi_object_list arg_list = { 4, params };
        unsigned long long value;
@@ -236,9 +236,8 @@ static int call_fext_func(int cmd, int arg0, int arg1, int arg2)
                return -ENODEV;
        }
 
-       vdbg_printk(FUJLAPTOP_DBG_TRACE,
-               "FUNC 0x%x (args 0x%x, 0x%x, 0x%x) returned 0x%x\n",
-                       cmd, arg0, arg1, arg2, (int)value);
+       vdbg_printk(FUJLAPTOP_DBG_TRACE, "FUNC 0x%x (args 0x%x, 0x%x, 0x%x) returned 0x%x\n",
+                   func, op, feature, state, (int)value);
        return value;
 }