Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d72498ca authored by Martin Peres's avatar Martin Peres Committed by Ben Skeggs
Browse files

drm/nouveau/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: default avatarArnd Bergmann <arnd@arndb.de>
Reported-by: Intel's 0-DAY
Fixes: 8d021d71 ("drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo")
Signed-off-by: default avatarMartin Peres <martin.peres@free.fr>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 7dfee682
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -42,7 +42,7 @@ nouveau_led(struct drm_device *dev)
}
}


/* nouveau_led.c */
/* nouveau_led.c */
#if IS_ENABLED(CONFIG_LEDS_CLASS)
#if IS_REACHABLE(CONFIG_LEDS_CLASS)
int  nouveau_led_init(struct drm_device *dev);
int  nouveau_led_init(struct drm_device *dev);
void nouveau_led_suspend(struct drm_device *dev);
void nouveau_led_suspend(struct drm_device *dev);
void nouveau_led_resume(struct drm_device *dev);
void nouveau_led_resume(struct drm_device *dev);