Re: [Nouveau] [PATCH] nouveau/led: prevent compiling the led-code if nouveau=y and leds=m

2017-01-09 Thread Ilia Mirkin
Ben - ping on this - should definitely be pushed for 4.10. People keep
running into it and sending variously broken patches attempting to fix
it.

On Tue, Dec 6, 2016 at 11:30 PM, Martin Peres  wrote:
> The proper fix would have been to select LEDS_CLASS but this can lead
> to a circular dependency, as found out by Arnd.
>
> This patch implements Arnd's suggestion instead, at the cost of some
> auto-magic for a fringe feature.
>
> Cc:  # 4.9.x-
> Reported-by: Arnd Bergmann 
> Reported-by: Intel's 0-DAY
> Fixes: 8d021d71b324 ("drm/nouveau/drm/nouveau: add a LED driver for the 
> NVIDIA logo")
> Signed-off-by: Martin Peres 
> ---
>  drivers/gpu/drm/nouveau/nouveau_led.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_led.h 
> b/drivers/gpu/drm/nouveau/nouveau_led.h
> index 187ecdb..21a5775 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_led.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_led.h
> @@ -42,7 +42,7 @@ nouveau_led(struct drm_device *dev)
>  }
>
>  /* nouveau_led.c */
> -#if IS_ENABLED(CONFIG_LEDS_CLASS)
> +#if IS_REACHABLE(CONFIG_LEDS_CLASS)
>  int  nouveau_led_init(struct drm_device *dev);
>  void nouveau_led_suspend(struct drm_device *dev);
>  void nouveau_led_resume(struct drm_device *dev);
> --
> 2.10.2
>
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] nouveau/led: prevent compiling the led-code if nouveau=y and leds=m

2016-12-06 Thread Martin Peres
The proper fix would have been to select LEDS_CLASS but this can lead
to a circular dependency, as found out by Arnd.

This patch implements Arnd's suggestion instead, at the cost of some
auto-magic for a fringe feature.

Cc:  # 4.9.x-
Reported-by: Arnd Bergmann 
Reported-by: Intel's 0-DAY
Fixes: 8d021d71b324 ("drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA 
logo")
Signed-off-by: Martin Peres 
---
 drivers/gpu/drm/nouveau/nouveau_led.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_led.h 
b/drivers/gpu/drm/nouveau/nouveau_led.h
index 187ecdb..21a5775 100644
--- a/drivers/gpu/drm/nouveau/nouveau_led.h
+++ b/drivers/gpu/drm/nouveau/nouveau_led.h
@@ -42,7 +42,7 @@ nouveau_led(struct drm_device *dev)
 }
 
 /* nouveau_led.c */
-#if IS_ENABLED(CONFIG_LEDS_CLASS)
+#if IS_REACHABLE(CONFIG_LEDS_CLASS)
 int  nouveau_led_init(struct drm_device *dev);
 void nouveau_led_suspend(struct drm_device *dev);
 void nouveau_led_resume(struct drm_device *dev);
-- 
2.10.2

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau