aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2016-05-09 09:39:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-17 23:47:11 -0400
commit5e25db870ec983be138b343a3d04c79a5c1f1703 (patch)
treea07efd8ec43da7ac714774af61001e3d544adf10
parent32a5a0c047343b11f581f663a2309cf43d13466f (diff)
isa: Dummy isa_register_driver should return error code
The inline isa_register_driver stub simply allows compilation on systems with CONFIG_ISA disabled; the dummy isa_register_driver does not register an isa_driver at all. The inline isa_register_driver should return -ENODEV to indicate lack of support when attempting to register an isa_driver on such a system with CONFIG_ISA disabled. Cc: Matthew Wilcox <matthew@wil.cx> Reported-by: Sasha Levin <sasha.levin@oracle.com> Tested-by: Ye Xiaolong Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--include/linux/isa.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 384ab9b7d79a..f2d0258414cf 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -6,6 +6,7 @@
6#define __LINUX_ISA_H 6#define __LINUX_ISA_H
7 7
8#include <linux/device.h> 8#include <linux/device.h>
9#include <linux/errno.h>
9#include <linux/kernel.h> 10#include <linux/kernel.h>
10 11
11struct isa_driver { 12struct isa_driver {
@@ -28,7 +29,7 @@ void isa_unregister_driver(struct isa_driver *);
28#else 29#else
29static inline int isa_register_driver(struct isa_driver *d, unsigned int i) 30static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
30{ 31{
31 return 0; 32 return -ENODEV;
32} 33}
33 34
34static inline void isa_unregister_driver(struct isa_driver *d) 35static inline void isa_unregister_driver(struct isa_driver *d)