mbox series

[0/8] watchdog: Remove #ifdef guards for PM related functions

Message ID 20220628193449.160585-1-paul@crapouillou.net (mailing list archive)
Headers show
Series watchdog: Remove #ifdef guards for PM related functions | expand

Message

Paul Cercueil June 28, 2022, 7:34 p.m. UTC
After my work [1] to introduce a new set of macros to be used with PM
callback functions, update the few watchdog drivers that do still
protect their .suspend/.resume implementations with a #ifdef guard to
use the new macros instead.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards. Not using #ifdef guards means that the code is
always compiled independently of any Kconfig option, and thanks to that
bugs and regressions are easier to catch.

Cheers,
-Paul

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/pm.h?id=c06ef740d401d0f4ab188882bf6f8d9cf0f75eaf


*** BLURB HERE ***

Paul Cercueil (8):
  watchdog: bcm7038_wdt: Remove #ifdef guards for PM related functions
  watchdog: dw_wdt: Remove #ifdef guards for PM related functions
  watchdog: mtk_wdt: Remove #ifdef guards for PM related functions
  watchdog: s3c2410_wdt: Remove #ifdef guards for PM related functions
  watchdog: sama5d4_wdt: Remove #ifdef guards for PM related functions
  watchdog: st_lpc_wdt: Remove #ifdef guards for PM related functions
  watchdog: tegra_wdt: Remove #ifdef guards for PM related functions
  watchdog: wdat_wdt: Remove #ifdef guards for PM related functions

 drivers/watchdog/bcm7038_wdt.c |  8 +++-----
 drivers/watchdog/dw_wdt.c      |  6 ++----
 drivers/watchdog/mtk_wdt.c     | 10 +++-------
 drivers/watchdog/s3c2410_wdt.c |  9 +++------
 drivers/watchdog/sama5d4_wdt.c |  8 +++-----
 drivers/watchdog/st_lpc_wdt.c  |  9 +++------
 drivers/watchdog/tegra_wdt.c   | 14 +++++---------
 drivers/watchdog/wdat_wdt.c    |  7 ++-----
 8 files changed, 24 insertions(+), 47 deletions(-)