[PATCH -next] Input: joystick: Raspberry Pi Sense HAT depends on HAS_IOMEM

From: Randy Dunlap
Date: Mon May 30 2022 - 22:30:04 EST


Since JOYSTICK_SENSEHAT selects MFD_SIMPLE_MFD_I2C and the latter
depends on HAS_IOMEM, and since 'select' does not follow any
dependency chains, JOYSTICK_SENSEHAT should also depend on HAS_IOMEM
to prevent a kconfig warning and a build error:

WARNING: unmet direct dependencies detected for MFD_SIMPLE_MFD_I2C
Depends on [n]: HAS_IOMEM [=n] && I2C [=y]
Selected by [y]:
- JOYSTICK_SENSEHAT [=y] && INPUT_JOYSTICK [=y] && INPUT [=y] && I2C [=y]

s390-linux-ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0xc8): undefined reference to `devm_mfd_add_devices'

Fixes: 41657514c796 ("Input: add Raspberry Pi Sense HAT joystick driver")
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Charles Mirabile <cmirabil@xxxxxxxxxx>
Cc: Daniel Bauman <dbauman@xxxxxxxxxx>
Cc: Mwesigwa Guma <mguma@xxxxxxxxxx>
Cc: Joel Savitz <jsavitz@xxxxxxxxxx>
Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Cc: linux-input@xxxxxxxxxxxxxxx
---
drivers/input/joystick/Kconfig | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/input/joystick/Kconfig
+++ b/drivers/input/joystick/Kconfig
@@ -402,6 +402,7 @@ config JOYSTICK_N64
config JOYSTICK_SENSEHAT
tristate "Raspberry Pi Sense HAT joystick"
depends on INPUT && I2C
+ depends on HAS_IOMEM
select MFD_SIMPLE_MFD_I2C
help
Say Y here if you want to enable the driver for the