From 2756b8ee3c9c1ef0816a4684c1153a8a9f03b0f9 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 25 Nov 2013 00:49:17 +0100 Subject: [PATCH] linux: add patch to fix nouveau driver build Signed-off-by: Stephan Raue --- ...xed_the_hwmon_undeclared_build_error.patch | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 packages/linux/patches/3.13-rc1/linux-999.91-nouveau-Fixed_the_hwmon_undeclared_build_error.patch diff --git a/packages/linux/patches/3.13-rc1/linux-999.91-nouveau-Fixed_the_hwmon_undeclared_build_error.patch b/packages/linux/patches/3.13-rc1/linux-999.91-nouveau-Fixed_the_hwmon_undeclared_build_error.patch new file mode 100644 index 0000000000..4cdae4c7f2 --- /dev/null +++ b/packages/linux/patches/3.13-rc1/linux-999.91-nouveau-Fixed_the_hwmon_undeclared_build_error.patch @@ -0,0 +1,47 @@ +From: Adrian Pop +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 +--- + 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 +