[PATCH -next] reset: fix linux/reset.h errors

From: Randy Dunlap
Date: Tue Apr 02 2019 - 11:20:17 EST


From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

The header file <linux/reset.h> uses errno constant(s) and the
ERR_PTR() macro but does not #include the appropriate header files
that provide those facilities, so add 2 header files to fix
build errors.

CC [M] drivers/gpu/drm/lima/lima_device.o
In file included from ../drivers/gpu/drm/lima/lima_device.c:5:0:
../include/linux/reset.h: In function â__device_resetâ:
../include/linux/reset.h:77:25: error: âENOTSUPPâ undeclared (first use in this function)
return optional ? 0 : -ENOTSUPP;
../include/linux/reset.h:77:25: note: each undeclared identifier is reported only once for each function it appears in
../include/linux/reset.h: In function â__of_reset_control_getâ:
../include/linux/reset.h:85:36: error: âENOTSUPPâ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function â__reset_control_getâ:
../include/linux/reset.h:93:36: error: âENOTSUPPâ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function â__devm_reset_control_getâ:
../include/linux/reset.h:101:36: error: âENOTSUPPâ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function âdevm_reset_control_array_getâ:
../include/linux/reset.h:107:36: error: âENOTSUPPâ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
../include/linux/reset.h: In function âof_reset_control_array_getâ:
../include/linux/reset.h:114:36: error: âENOTSUPPâ undeclared (first use in this function)
return optional ? NULL : ERR_PTR(-ENOTSUPP);
In file included from ../drivers/gpu/drm/lima/lima_device.c:5:0:
../include/linux/reset.h: In function â__devm_reset_control_getâ:
../include/linux/reset.h:102:1: warning: control reaches end of non-void function [-Wreturn-type]
}


Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
include/linux/reset.h | 2 ++
1 file changed, 2 insertions(+)

--- linux-next-20190402.orig/include/linux/reset.h
+++ linux-next-20190402/include/linux/reset.h
@@ -2,6 +2,8 @@
#ifndef _LINUX_RESET_H_
#define _LINUX_RESET_H_

+#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/types.h>

struct device;