Displaying 6 results from an estimated 6 matches for "led_classdev_regist".
Did you mean:
led_classdev_register
2016 May 07
0
[PATCH] drm/nouveau: add a LED driver for the NVIDIA logo
looks good, just a minor thing: You need to check for
CONFIG_LEDS_CLASS, otherwise the compile throws out "warnings":
WARNING: "led_classdev_register"
[/home/karol/Dokumente/repos/nouveau/drm/nouveau/nouveau.ko]
undefined!
WARNING: "led_classdev_resume"
[/home/karol/Dokumente/repos/nouveau/drm/nouveau/nouveau.ko]
undefined!
WARNING: "led_classdev_unregister"
[/home/karol/Dokumente/repos/nouveau/drm/nouveau/nouveau.ko]...
2016 Aug 22
10
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...gt;led)
+ return -ENOMEM;
+ drm->led->dev = dev;
+
+ drm->led->led.name = "nvidia-logo";
+ drm->led->led.max_brightness = 255;
+ drm->led->led.brightness_get = nouveau_led_get_brightness;
+ drm->led->led.brightness_set = nouveau_led_set_brightness;
+
+ ret = led_classdev_register(dev->dev, &drm->led->led);
+ if (ret) {
+ kfree(drm->led);
+ return ret;
+ }
+
+ return 0;
+}
+
+void
+nouveau_led_suspend(struct drm_device *dev)
+{
+ struct nouveau_drm *drm = nouveau_drm(dev);
+
+ led_classdev_suspend(&drm->led->led);
+}
+
+void
+nouveau_led_resume(...
2017 Jan 18
0
[PATCH] drm/nouveau/led: prevent a possible use-after-free
...drm/nouveau/nouveau_led.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c
index 72456b16..2c5e0628 100644
--- a/drm/nouveau/nouveau_led.c
+++ b/drm/nouveau/nouveau_led.c
@@ -102,6 +102,7 @@ nouveau_led_init(struct drm_device *dev)
ret = led_classdev_register(dev->dev, &drm->led->led);
if (ret) {
kfree(drm->led);
+ drm->led = NULL;
return ret;
}
--
2.11.0
2016 Aug 22
0
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...gt;led)
+ return -ENOMEM;
+ drm->led->dev = dev;
+
+ drm->led->led.name = "nvidia-logo";
+ drm->led->led.max_brightness = 255;
+ drm->led->led.brightness_get = nouveau_led_get_brightness;
+ drm->led->led.brightness_set = nouveau_led_set_brightness;
+
+ ret = led_classdev_register(dev->dev, &drm->led->led);
+ if (ret) {
+ kfree(drm->led);
+ return ret;
+ }
+#endif
+
+ return 0;
+}
+
+void
+nouveau_led_suspend(struct drm_device *dev)
+{
+#ifdef CONFIG_LEDS_CLASS
+ struct nouveau_drm *drm = nouveau_drm(dev);
+
+ led_classdev_suspend(&drm->led->led...
2016 May 03
0
[PATCH] drm/nouveau: add a LED driver for the NVIDIA logo
...t; + drm->led->led.name = "nvidia-logo";
> + drm->led->led.max_brightness = 255;
> + drm->led->led.brightness_get = nouveau_led_get_brightness;
> + drm->led->led.brightness_set = nouveau_led_set_brightness;
> +
> + ret = led_classdev_register(dev->dev, &drm->led->led);
> + if (ret) {
> + kfree(drm->led);
> + return ret;
> + }
> +
> + return 0;
> +}
> +
> +void
> +nouveau_led_suspend(struct drm_device *dev)
> +{
> + struct nouveau_dr...
2016 Aug 23
0
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...t; + drm->led->led.name = "nvidia-logo";
> + drm->led->led.max_brightness = 255;
> + drm->led->led.brightness_get = nouveau_led_get_brightness;
> + drm->led->led.brightness_set = nouveau_led_set_brightness;
> +
> + ret = led_classdev_register(dev->dev, &drm->led->led);
> + if (ret) {
> + kfree(drm->led);
> + return ret;
> + }
> +
> + return 0;
> +}
> +
> +void
> +nouveau_led_suspend(struct drm_device *dev)
> +{
> + struct nouveau_dr...