diff options
author | Martin Peres <martin.peres@free.fr> | 2016-12-07 06:30:15 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-01-31 19:52:57 +1000 |
commit | 774b94348e0df628a851174864154c9c1780d98a (patch) | |
tree | a5e83e4ce5529fbcd7692c11eb16bcaf6bcbdd51 | |
parent | ddb1313d6805835554dde934d7455189355c97c4 (diff) | |
download | nouveau-774b94348e0df628a851174864154c9c1780d98a.tar.gz |
nouveau/led: prevent compiling the led-code if nouveau=y and leds=m
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.
Reported-by: Arnd Bergmann <arnd@arndb.de>
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 <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drm/nouveau/nouveau_led.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drm/nouveau/nouveau_led.h b/drm/nouveau/nouveau_led.h index 187ecdb82..21a577502 100644 --- a/drm/nouveau/nouveau_led.h +++ b/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); |