Skip to content

Commit

Permalink
spi: sprd: adi: Use IS_ENABLED() to validate configs
Browse files Browse the repository at this point in the history
If the Spreadtrum wachdog is loaded as a module, we still need set default
watchdog reboot mode in case the rebooting is caused by watchdog. But now
we can not set the watchdog reboot mode by using '#ifdef' to validate
the watchdog configuration, thus we can change to use IS_ENABLED() to
fix this issue.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/e38807eadd5550add8eb90dd3f8fbe2cfc39cc13.1586759322.git.baolin.wang7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Baolin Wang authored and Mark Brown committed Apr 14, 2020
1 parent 49686df commit bb4bf8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-sprd-adi.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static int sprd_adi_transfer_one(struct spi_controller *ctlr,

static void sprd_adi_set_wdt_rst_mode(struct sprd_adi *sadi)
{
#ifdef CONFIG_SPRD_WATCHDOG
#if IS_ENABLED(CONFIG_SPRD_WATCHDOG)
u32 val;

/* Set default watchdog reboot mode */
Expand Down

0 comments on commit bb4bf8d

Please sign in to comment.