lkml.org 
[lkml]   [2016]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1] ESIA : Dummy eisa_driver_register should return error code
Date
The inline eisa_driver_register stub simply allows compilation on
systems with CONFIG_EISA disabled. the dummy eisa_driver_register
does not register an *_eisa_driver at all. The inline
eisa_driver_register should return to indicate lack of support
when attempting to register an *_eisa_driver on such a system with
CONFIG_EISA disabled.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
include/linux/eisa.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/eisa.h b/include/linux/eisa.h
index 6925249..cbfc684 100644
--- a/include/linux/eisa.h
+++ b/include/linux/eisa.h
@@ -70,7 +70,10 @@ void eisa_driver_unregister (struct eisa_driver *edrv);

#else /* !CONFIG_EISA */

-static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; }
+static inline int eisa_driver_register(struct eisa_driver *edrv)
+{
+ return -ENODEV;
+}
static inline void eisa_driver_unregister (struct eisa_driver *edrv) { }

#endif /* !CONFIG_EISA */
--
1.9.1
\
 
 \ /
  Last update: 2016-07-18 21:21    [W:0.086 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site