]> asedeno.scripts.mit.edu Git - linux.git/commit
platform/x86: fujitsu-laptop: rework debugging
authorMichał Kępień <kernel@kempniu.pl>
Fri, 16 Jun 2017 04:40:58 +0000 (06:40 +0200)
committerDarren Hart (VMware) <dvhart@infradead.org>
Sat, 1 Jul 2017 03:13:06 +0000 (20:13 -0700)
commiteee77da1a7f02fd114288c4c379fed3d2ca4593d
treedf2773ed7549da078e20452646ee81c284173885
parent32c28f1f431f1c1c6db3491820a0086ddcd317c6
platform/x86: fujitsu-laptop: rework debugging

Using a dedicated Kconfig option for enabling debugging means the user
may be forced to recompile their kernel in order to gather debugging
information, which is inconvenient.  Replace custom debugging
infrastructure with standard logging functions, taking advantage of
dynamic debug.  Replace a pr_info() call inside an ACPI callback with an
acpi_handle_info() call.

The following mapping was used:

  - FUJLAPTOP_DBG_ERROR -> acpi_handle_err()
  - FUJLAPTOP_DBG_WARN  -> acpi_handle_info() / dev_info()
  - FUJLAPTOP_DBG_INFO  -> acpi_handle_debug()
  - FUJLAPTOP_DBG_TRACE -> acpi_handle_debug() / dev_dbg()

This means that some events which used to only be logged when the user
explicitly requested it will now be logged by default:

  - ACPI method evaluation errors,
  - unknown ACPI notification codes,
  - unknown hotkey scancodes.

The first type of events should happen rarely, if ever at all.  The rest
is interesting from driver development perspective as their presence in
the logs will mean the driver is unaware of certain events, handling of
which should be implemented.

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/Kconfig
drivers/platform/x86/fujitsu-laptop.c