Displaying 4 results from an estimated 4 matches for "5e28b5f".
2016 Sep 16
2
[PATCH 2/3] drm/nouveau/led: guard against a division by 0
...tin Peres <martin.peres at free.fr>:
> Signed-off-by: Martin Peres <martin.peres at free.fr>
> ---
>  drm/nouveau/nouveau_led.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c
> index 5e28b5f..1f731da 100644
> --- a/drm/nouveau/nouveau_led.c
> +++ b/drm/nouveau/nouveau_led.c
> @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led)
>         div =  nvif_rd32(device, 0x61c880) & 0x00ffffff;
>         duty = nvif_rd32(device, 0x61c884) & 0x00ffffff;...
2016 Sep 16
7
[PATCH 1/3] drm/nouveau/led: don't access led subdev if it wasn't initialized
From: Karol Herbst <karolherbst at gmail.com>
Fixes a kernel crash on suspend/resume.
---
 drm/nouveau/nouveau_led.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c
index 9eed5a6..5e28b5f 100644
--- a/drm/nouveau/nouveau_led.c
+++ b/drm/nouveau/nouveau_led.c
@@ -107,7 +107,8 @@ nouveau_led_suspend(struct drm_device *dev)
 {
 	struct nouveau_drm *drm = nouveau_drm(dev);
 
-	led_classdev_suspend(&drm->led->led);
+	if (drm->led)
+		led_classdev_suspend(&drm->led->...
2016 Sep 16
0
[PATCH 2/3] drm/nouveau/led: guard against a division by 0
Signed-off-by: Martin Peres <martin.peres at free.fr>
---
 drm/nouveau/nouveau_led.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c
index 5e28b5f..1f731da 100644
--- a/drm/nouveau/nouveau_led.c
+++ b/drm/nouveau/nouveau_led.c
@@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led)
 	div =  nvif_rd32(device, 0x61c880) & 0x00ffffff;
 	duty = nvif_rd32(device, 0x61c884) & 0x00ffffff;
 
-	return duty * LED_FULL / div;
+	i...
2016 Sep 16
0
[PATCH 2/3] drm/nouveau/led: guard against a division by 0
...free.fr>:
>> Signed-off-by: Martin Peres <martin.peres at free.fr>
>> ---
>>   drm/nouveau/nouveau_led.c | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c
>> index 5e28b5f..1f731da 100644
>> --- a/drm/nouveau/nouveau_led.c
>> +++ b/drm/nouveau/nouveau_led.c
>> @@ -44,7 +44,10 @@ nouveau_led_get_brightness(struct led_classdev *led)
>>          div =  nvif_rd32(device, 0x61c880) & 0x00ffffff;
>>          duty = nvif_rd32(device, 0x61c8...