mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
linux: add patch to fix nouveau driver build
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
499c1aa2a4
commit
2756b8ee3c
@ -0,0 +1,47 @@
|
|||||||
|
From: Adrian Pop <sultryweather@xxxxxxxxx>
|
||||||
|
Date: Fri, 22 Nov 2013 12:52:19 +0200
|
||||||
|
Subject: [PATCH] nouveau: Fixed the 'hwmon' undeclared build error
|
||||||
|
|
||||||
|
hwmon is declared inside the #if defined(CONFIG_HWMON)... but is still
|
||||||
|
referenced outside of it, which results in a build error. By removing
|
||||||
|
the reference, Linux builds successfully with both code paths.
|
||||||
|
Two warnings from running checkpatch.pl have been fixed too.
|
||||||
|
|
||||||
|
Signed-off-by: Adrian Pop <sultryweather@xxxxxxxxx>
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/nouveau/nouveau_hwmon.c | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
|
||||||
|
index 38a4db5..21fc8d6 100644
|
||||||
|
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
|
||||||
|
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
|
||||||
|
@@ -357,7 +357,7 @@ nouveau_hwmon_show_fan1_input(struct device *d, struct device_attribute *attr,
|
||||||
|
static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, nouveau_hwmon_show_fan1_input,
|
||||||
|
NULL, 0);
|
||||||
|
|
||||||
|
- static ssize_t
|
||||||
|
+static ssize_t
|
||||||
|
nouveau_hwmon_get_pwm1_enable(struct device *d,
|
||||||
|
struct device_attribute *a, char *buf)
|
||||||
|
{
|
||||||
|
@@ -383,7 +383,7 @@ nouveau_hwmon_set_pwm1_enable(struct device *d, struct device_attribute *a,
|
||||||
|
long value;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
- if (strict_strtol(buf, 10, &value) == -EINVAL)
|
||||||
|
+ if (kstrtol(buf, 10, &value) == -EINVAL)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
ret = therm->attr_set(therm, NOUVEAU_THERM_ATTR_FAN_MODE, value);
|
||||||
|
@@ -630,7 +630,6 @@ error:
|
||||||
|
hwmon->hwmon = NULL;
|
||||||
|
return ret;
|
||||||
|
#else
|
||||||
|
- hwmon->hwmon = NULL;
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.4.2
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user