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)
commita2b691772acd5bcd8b64693e0fdbc3431d266db4
treedeede2bacdb494c5abd807a202dc2b97d0955b60
parentc823c17a8ea4db4943152388a0beb9a556715716
ACPI: EC: Avoid passing redundant argument to functions

After commit 406857f773b0 ("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