Skip to content

Commit

Permalink
MIPS: alchemy: Fix build breakage, if TOUCHSCREEN_WM97XX is disabled
Browse files Browse the repository at this point in the history
Only include wm97xx touchscreen probing code, if driver is enabled.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
  • Loading branch information
tsbogend committed Oct 6, 2020
1 parent 047248c commit 396c7d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/mips/alchemy/devboards/db1300.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ static struct platform_device db1300_lcd_dev = {

/**********************************************************************/

#if IS_ENABLED(CONFIG_TOUCHSCREEN_WM97XX)
static void db1300_wm97xx_irqen(struct wm97xx *wm, int enable)
{
if (enable)
Expand Down Expand Up @@ -762,6 +763,12 @@ static int db1300_wm97xx_probe(struct platform_device *pdev)

return wm97xx_register_mach_ops(wm, &db1300_wm97xx_ops);
}
#else
static int db1300_wm97xx_probe(struct platform_device *pdev)
{
return -ENODEV;
}
#endif

static struct platform_driver db1300_wm97xx_driver = {
.driver.name = "wm97xx-touch",
Expand Down

0 comments on commit 396c7d9

Please sign in to comment.