diff --git a/drivers/leds/flash/Kconfig b/drivers/leds/flash/Kconfig
index d21d273ef3da2cabe7a51c7d83aa9ba758631cc2..b580b416b9a40b7294a4f5045b99d734873173fd 100644
--- a/drivers/leds/flash/Kconfig
+++ b/drivers/leds/flash/Kconfig
@@ -5,6 +5,7 @@ if LEDS_CLASS_FLASH
 config LEDS_RT8515
 	tristate "LED support for Richtek RT8515 flash/torch LED"
 	depends on GPIOLIB
+	depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
 	help
 	  This option enables support for the Richtek RT8515 flash
 	  and torch LEDs found on some mobile phones.