* [PATCH] isa: Dummy isa_register_driver should return error code
@ 2016-05-09 13:39 William Breathitt Gray
0 siblings, 0 replies; only message in thread
From: William Breathitt Gray @ 2016-05-09 13:39 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, matthew
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>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
include/linux/isa.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 5ab8528..f1f2adf 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -6,6 +6,7 @@
#define __LINUX_ISA_H
#include <linux/device.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
struct isa_driver {
@@ -28,7 +29,7 @@ void isa_unregister_driver(struct isa_driver *);
#else
static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
{
- return 0;
+ return -ENODEV;
}
static inline void isa_unregister_driver(struct isa_driver *d)
--
2.7.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-09 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-09 13:39 [PATCH] isa: Dummy isa_register_driver should return error code William Breathitt Gray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).