• Michał Kępień's avatar
    platform/x86: fujitsu-laptop: rework debugging · eee77da1
    Michał Kępień authored
    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: default avatarMichał Kępień <kernel@kempniu.pl>
    Reviewed-by: default avatarJonathan Woithe <jwoithe@just42.net>
    Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
    eee77da1
fujitsu-laptop.c 27.1 KB