Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

leds: fix up dependencies

It's not useful to build LED triggers when there's no LEDs that can be
triggered by them. Therefore, fix up the dependencies so that this
cannot happen, and fix a few users that select triggers to depend on
LEDS_CLASS as well (there is also one user that also selects LEDS_CLASS,
which is OK).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Arnd Hannemann <arnd@arndnet.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Johannes Berg and committed by
Linus Torvalds
0bae35e1 e172662d

+43 -10
+41 -9
drivers/leds/Kconfig
··· 7 7 This is not related to standard keyboard LEDs which are controlled 8 8 via the input system. 9 9 10 - if NEW_LEDS 11 - 12 10 config LEDS_CLASS 13 11 bool "LED Class Support" 12 + depends on NEW_LEDS 14 13 help 15 14 This option enables the led sysfs class in /sys/class/leds. You'll 16 15 need this to do anything useful with LEDs. If unsure, say N. 17 16 18 - if LEDS_CLASS 17 + if NEW_LEDS 19 18 20 19 comment "LED drivers" 21 20 22 21 config LEDS_88PM860X 23 22 tristate "LED Support for Marvell 88PM860x PMIC" 23 + depends on LEDS_CLASS 24 24 depends on MFD_88PM860X 25 25 help 26 26 This option enables support for on-chip LED drivers found on Marvell ··· 28 28 29 29 config LEDS_ATMEL_PWM 30 30 tristate "LED Support using Atmel PWM outputs" 31 + depends on LEDS_CLASS 31 32 depends on ATMEL_PWM 32 33 help 33 34 This option enables support for LEDs driven using outputs ··· 36 35 37 36 config LEDS_LOCOMO 38 37 tristate "LED Support for Locomo device" 38 + depends on LEDS_CLASS 39 39 depends on SHARP_LOCOMO 40 40 help 41 41 This option enables support for the LEDs on Sharp Locomo. ··· 44 42 45 43 config LEDS_MIKROTIK_RB532 46 44 tristate "LED Support for Mikrotik Routerboard 532" 45 + depends on LEDS_CLASS 47 46 depends on MIKROTIK_RB532 48 47 help 49 48 This option enables support for the so called "User LED" of ··· 52 49 53 50 config LEDS_S3C24XX 54 51 tristate "LED Support for Samsung S3C24XX GPIO LEDs" 52 + depends on LEDS_CLASS 55 53 depends on ARCH_S3C2410 56 54 help 57 55 This option enables support for LEDs connected to GPIO lines ··· 60 56 61 57 config LEDS_AMS_DELTA 62 58 tristate "LED Support for the Amstrad Delta (E3)" 59 + depends on LEDS_CLASS 63 60 depends on MACH_AMS_DELTA 64 61 help 65 62 This option enables support for the LEDs on Amstrad Delta (E3). 66 63 67 64 config LEDS_NET48XX 68 65 tristate "LED Support for Soekris net48xx series Error LED" 66 + depends on LEDS_CLASS 69 67 depends on SCx200_GPIO 70 68 help 71 69 This option enables support for the Soekris net4801 and net4826 error ··· 85 79 86 80 config LEDS_FSG 87 81 tristate "LED Support for the Freecom FSG-3" 82 + depends on LEDS_CLASS 88 83 depends on MACH_FSG 89 84 help 90 85 This option enables support for the LEDs on the Freecom FSG-3. 91 86 92 87 config LEDS_WRAP 93 88 tristate "LED Support for the WRAP series LEDs" 89 + depends on LEDS_CLASS 94 90 depends on SCx200_GPIO 95 91 help 96 92 This option enables support for the PCEngines WRAP programmable LEDs. 97 93 98 94 config LEDS_ALIX2 99 95 tristate "LED Support for ALIX.2 and ALIX.3 series" 96 + depends on LEDS_CLASS 100 97 depends on X86 && !GPIO_CS5535 && !CS5535_GPIO 101 98 help 102 99 This option enables support for the PCEngines ALIX.2 and ALIX.3 LEDs. ··· 107 98 108 99 config LEDS_H1940 109 100 tristate "LED Support for iPAQ H1940 device" 101 + depends on LEDS_CLASS 110 102 depends on ARCH_H1940 111 103 help 112 104 This option enables support for the LEDs on the h1940. 113 105 114 106 config LEDS_COBALT_QUBE 115 107 tristate "LED Support for the Cobalt Qube series front LED" 108 + depends on LEDS_CLASS 116 109 depends on MIPS_COBALT 117 110 help 118 111 This option enables support for the front LED on Cobalt Qube series ··· 128 117 129 118 config LEDS_SUNFIRE 130 119 tristate "LED support for SunFire servers." 120 + depends on LEDS_CLASS 131 121 depends on SPARC64 132 122 select LEDS_TRIGGERS 133 123 help ··· 137 125 138 126 config LEDS_HP6XX 139 127 tristate "LED Support for the HP Jornada 6xx" 128 + depends on LEDS_CLASS 140 129 depends on SH_HP6XX 141 130 help 142 131 This option enables LED support for the handheld ··· 145 132 146 133 config LEDS_PCA9532 147 134 tristate "LED driver for PCA9532 dimmer" 135 + depends on LEDS_CLASS 148 136 depends on I2C && INPUT && EXPERIMENTAL 149 137 help 150 138 This option enables support for NXP pca9532 ··· 154 140 155 141 config LEDS_GPIO 156 142 tristate "LED Support for GPIO connected LEDs" 143 + depends on LEDS_CLASS 157 144 depends on GENERIC_GPIO 158 145 help 159 146 This option enables support for the LEDs connected to GPIO ··· 182 167 183 168 config LEDS_LP3944 184 169 tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip" 170 + depends on LEDS_CLASS 185 171 depends on I2C 186 172 help 187 173 This option enables support for LEDs connected to the National ··· 212 196 213 197 config LEDS_CLEVO_MAIL 214 198 tristate "Mail LED on Clevo notebook" 199 + depends on LEDS_CLASS 215 200 depends on X86 && SERIO_I8042 && DMI 216 201 help 217 202 This driver makes the mail LED accessible from userspace ··· 243 226 244 227 config LEDS_PCA955X 245 228 tristate "LED Support for PCA955x I2C chips" 229 + depends on LEDS_CLASS 246 230 depends on I2C 247 231 help 248 232 This option enables support for LEDs connected to PCA955x ··· 252 234 253 235 config LEDS_WM831X_STATUS 254 236 tristate "LED support for status LEDs on WM831x PMICs" 237 + depends on LEDS_CLASS 255 238 depends on MFD_WM831X 256 239 help 257 240 This option enables support for the status LEDs of the WM831x ··· 260 241 261 242 config LEDS_WM8350 262 243 tristate "LED Support for WM8350 AudioPlus PMIC" 244 + depends on LEDS_CLASS 263 245 depends on MFD_WM8350 264 246 help 265 247 This option enables support for LEDs driven by the Wolfson ··· 268 248 269 249 config LEDS_DA903X 270 250 tristate "LED Support for DA9030/DA9034 PMIC" 251 + depends on LEDS_CLASS 271 252 depends on PMIC_DA903X 272 253 help 273 254 This option enables support for on-chip LED drivers found ··· 276 255 277 256 config LEDS_DAC124S085 278 257 tristate "LED Support for DAC124S085 SPI DAC" 258 + depends on LEDS_CLASS 279 259 depends on SPI 280 260 help 281 261 This option enables support for DAC124S085 SPI DAC from NatSemi, ··· 284 262 285 263 config LEDS_PWM 286 264 tristate "PWM driven LED Support" 265 + depends on LEDS_CLASS 287 266 depends on HAVE_PWM 288 267 help 289 268 This option enables support for pwm driven LEDs 290 269 291 270 config LEDS_REGULATOR 292 271 tristate "REGULATOR driven LED support" 272 + depends on LEDS_CLASS 293 273 depends on REGULATOR 294 274 help 295 275 This option enables support for regulator driven LEDs. 296 276 297 277 config LEDS_BD2802 298 278 tristate "LED driver for BD2802 RGB LED" 279 + depends on LEDS_CLASS 299 280 depends on I2C 300 281 help 301 282 This option enables support for BD2802GU RGB LED driver chips ··· 306 281 307 282 config LEDS_INTEL_SS4200 308 283 tristate "LED driver for Intel NAS SS4200 series" 284 + depends on LEDS_CLASS 309 285 depends on PCI && DMI 310 286 help 311 287 This option enables support for the Intel SS4200 series of ··· 316 290 317 291 config LEDS_LT3593 318 292 tristate "LED driver for LT3593 controllers" 293 + depends on LEDS_CLASS 319 294 depends on GENERIC_GPIO 320 295 help 321 296 This option enables support for LEDs driven by a Linear Technology ··· 325 298 326 299 config LEDS_ADP5520 327 300 tristate "LED Support for ADP5520/ADP5501 PMIC" 301 + depends on LEDS_CLASS 328 302 depends on PMIC_ADP5520 329 303 help 330 304 This option enables support for on-chip LED drivers found ··· 336 308 337 309 config LEDS_DELL_NETBOOKS 338 310 tristate "External LED on Dell Business Netbooks" 311 + depends on LEDS_CLASS 339 312 depends on X86 && ACPI_WMI 340 313 help 341 314 This adds support for the Latitude 2100 and similar ··· 344 315 345 316 config LEDS_MC13783 346 317 tristate "LED Support for MC13783 PMIC" 318 + depends on LEDS_CLASS 347 319 depends on MFD_MC13783 348 320 help 349 321 This option enable support for on-chip LED drivers found ··· 352 322 353 323 config LEDS_NS2 354 324 tristate "LED support for Network Space v2 GPIO LEDs" 325 + depends on LEDS_CLASS 355 326 depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || MACH_NETSPACE_MAX_V2 || D2NET_V2 356 327 default y 357 328 help ··· 371 340 372 341 config LEDS_TRIGGERS 373 342 bool "LED Trigger support" 343 + depends on LEDS_CLASS 374 344 help 375 345 This option enables trigger support for the leds class. 376 346 These triggers allow kernel events to drive the LEDs and can 377 347 be configured via sysfs. If unsure, say Y. 378 348 379 - if LEDS_TRIGGERS 380 - 381 349 comment "LED Triggers" 382 350 383 351 config LEDS_TRIGGER_TIMER 384 352 tristate "LED Timer Trigger" 353 + depends on LEDS_TRIGGERS 385 354 help 386 355 This allows LEDs to be controlled by a programmable timer 387 356 via sysfs. Some LED hardware can be programmed to start ··· 393 362 config LEDS_TRIGGER_IDE_DISK 394 363 bool "LED IDE Disk Trigger" 395 364 depends on IDE_GD_ATA 365 + depends on LEDS_TRIGGERS 396 366 help 397 367 This allows LEDs to be controlled by IDE disk activity. 398 368 If unsure, say Y. 399 369 400 370 config LEDS_TRIGGER_HEARTBEAT 401 371 tristate "LED Heartbeat Trigger" 372 + depends on LEDS_TRIGGERS 402 373 help 403 374 This allows LEDs to be controlled by a CPU load average. 404 375 The flash frequency is a hyperbolic function of the 1-minute ··· 409 376 410 377 config LEDS_TRIGGER_BACKLIGHT 411 378 tristate "LED backlight Trigger" 379 + depends on LEDS_TRIGGERS 412 380 help 413 381 This allows LEDs to be controlled as a backlight device: they 414 382 turn off and on when the display is blanked and unblanked. ··· 418 384 419 385 config LEDS_TRIGGER_GPIO 420 386 tristate "LED GPIO Trigger" 387 + depends on LEDS_TRIGGERS 421 388 depends on GPIOLIB 422 389 help 423 390 This allows LEDs to be controlled by gpio events. It's good ··· 431 396 432 397 config LEDS_TRIGGER_DEFAULT_ON 433 398 tristate "LED Default ON Trigger" 399 + depends on LEDS_TRIGGERS 434 400 help 435 401 This allows LEDs to be initialised in the ON state. 436 402 If unsure, say Y. 437 403 438 404 comment "iptables trigger is under Netfilter config (LED target)" 439 405 depends on LEDS_TRIGGERS 440 - 441 - endif # LEDS_TRIGGERS 442 - 443 - endif # LEDS_CLASS 444 406 445 407 endif # NEW_LEDS
+1
drivers/macintosh/Kconfig
··· 102 102 config ADB_PMU_LED_IDE 103 103 bool "Use front LED as IDE LED by default" 104 104 depends on ADB_PMU_LED 105 + depends on LEDS_CLASS 105 106 select LEDS_TRIGGERS 106 107 select LEDS_TRIGGER_IDE_DISK 107 108 help
+1 -1
net/mac80211/Kconfig
··· 92 92 config MAC80211_LEDS 93 93 bool "Enable LED triggers" 94 94 depends on MAC80211 95 - select NEW_LEDS 95 + depends on LEDS_CLASS 96 96 select LEDS_TRIGGERS 97 97 ---help--- 98 98 This option enables a few LED triggers for different