]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: EC: Avoid passing redundant argument to functions
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 27 Feb 2020 21:55:22 +0000 (22:55 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 27 Feb 2020 21:55:22 +0000 (22:55 +0100)
commit7f16f402eb7a4719eb128dc7e3f30d9003508786
treedeede2bacdb494c5abd807a202dc2b97d0955b60
parentcc369575def01e8da3846185be8bf54428c6ca87
ACPI: EC: Avoid passing redundant argument to functions

After commit e1039e060045 ("ACPI: EC: add support for hardware-reduced
systems") the handle_events argument passed to ec_install_handlers()
and acpi_ec_setup() is redundant, because it is always 'false' when
the device argument passed to them in NULL and it is always 'true'
otherwise, so the device argument can be tested against NULL instead
of testing the handle_events one.

Accordingly, modify ec_install_handlers() and acpi_ec_setup() to take
two arguments and reduce the number of checks in the former.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c