macintosh: via-pmu-led: *********************************

Message ID 20230223014151.19270-1-rdunlap@infradead.org
State New
Headers
Series macintosh: via-pmu-led: ********************************* |

Commit Message

Randy Dunlap Feb. 23, 2023, 1:41 a.m. UTC
  LEDS_TRIGGER_DISK depends on ATA, so selecting LEDS_TRIGGER_DISK
when ATA is not set/enabled causes a Kconfig warning:

WARNING: unmet direct dependencies detected for LEDS_TRIGGER_DISK
  Depends on [n]: NEW_LEDS [=y] && LEDS_TRIGGERS [=y] && ATA [=n]
  Selected by [y]:
  - ADB_PMU_LED_DISK [=y] && MACINTOSH_DRIVERS [=y] && ADB_PMU_LED [=y] && LEDS_CLASS [=y]

Fix this by making ADB_PMU_LED_DISK depend on ATA.

Seen on both PPC32 and PPC64.

Fixes: 0e865a80c135 ("macintosh: Remove dependency on IDE_GD_ATA if ADB_PMU_LED_DISK is selected")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Elimar Riesebieter <riesebie@lxtec.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
---
 drivers/macintosh/Kconfig |    1 +
 1 file changed, 1 insertion(+)
  

Comments

Michael Ellerman Feb. 23, 2023, 8:56 a.m. UTC | #1
Randy Dunlap <rdunlap@infradead.org> writes:
> LEDS_TRIGGER_DISK depends on ATA, so selecting LEDS_TRIGGER_DISK
> when ATA is not set/enabled causes a Kconfig warning:
>
> WARNING: unmet direct dependencies detected for LEDS_TRIGGER_DISK
>   Depends on [n]: NEW_LEDS [=y] && LEDS_TRIGGERS [=y] && ATA [=n]
>   Selected by [y]:
>   - ADB_PMU_LED_DISK [=y] && MACINTOSH_DRIVERS [=y] && ADB_PMU_LED [=y] && LEDS_CLASS [=y]
>
> Fix this by making ADB_PMU_LED_DISK depend on ATA.

Should it just depend on LEDS_TRIGGER_DISK ?

cheers

> Seen on both PPC32 and PPC64.
>
> Fixes: 0e865a80c135 ("macintosh: Remove dependency on IDE_GD_ATA if ADB_PMU_LED_DISK is selected")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Elimar Riesebieter <riesebie@lxtec.de>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
>  drivers/macintosh/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
>
> diff -- a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
> --- a/drivers/macintosh/Kconfig
> +++ b/drivers/macintosh/Kconfig
> @@ -86,6 +86,7 @@ config ADB_PMU_LED
>  
>  config ADB_PMU_LED_DISK
>  	bool "Use front LED as DISK LED by default"
> +	depends on ATA
>  	depends on ADB_PMU_LED
>  	depends on LEDS_CLASS
>  	select LEDS_TRIGGERS
  
Randy Dunlap Feb. 23, 2023, 3:51 p.m. UTC | #2
On 2/23/23 00:56, Michael Ellerman wrote:
> Randy Dunlap <rdunlap@infradead.org> writes:
>> LEDS_TRIGGER_DISK depends on ATA, so selecting LEDS_TRIGGER_DISK
>> when ATA is not set/enabled causes a Kconfig warning:
>>
>> WARNING: unmet direct dependencies detected for LEDS_TRIGGER_DISK
>>   Depends on [n]: NEW_LEDS [=y] && LEDS_TRIGGERS [=y] && ATA [=n]
>>   Selected by [y]:
>>   - ADB_PMU_LED_DISK [=y] && MACINTOSH_DRIVERS [=y] && ADB_PMU_LED [=y] && LEDS_CLASS [=y]
>>
>> Fix this by making ADB_PMU_LED_DISK depend on ATA.
> 
> Should it just depend on LEDS_TRIGGER_DISK ?

Hmph. Yes, good idea. Thanks.

> 
>> Seen on both PPC32 and PPC64.
>>
>> Fixes: 0e865a80c135 ("macintosh: Remove dependency on IDE_GD_ATA if ADB_PMU_LED_DISK is selected")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> Cc: Paul Mackerras <paulus@samba.org>
>> Cc: Elimar Riesebieter <riesebie@lxtec.de>
>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>> Cc: linuxppc-dev@lists.ozlabs.org
>> ---
>>  drivers/macintosh/Kconfig |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff -- a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
>> --- a/drivers/macintosh/Kconfig
>> +++ b/drivers/macintosh/Kconfig
>> @@ -86,6 +86,7 @@ config ADB_PMU_LED
>>  
>>  config ADB_PMU_LED_DISK
>>  	bool "Use front LED as DISK LED by default"
>> +	depends on ATA
>>  	depends on ADB_PMU_LED
>>  	depends on LEDS_CLASS
>>  	select LEDS_TRIGGERS
  

Patch

diff -- a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
--- a/drivers/macintosh/Kconfig
+++ b/drivers/macintosh/Kconfig
@@ -86,6 +86,7 @@  config ADB_PMU_LED
 
 config ADB_PMU_LED_DISK
 	bool "Use front LED as DISK LED by default"
+	depends on ATA
 	depends on ADB_PMU_LED
 	depends on LEDS_CLASS
 	select LEDS_TRIGGERS