OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [LINUX_2_4_26_OR32/] [linux/] [linux-2.4/] [include/] [linux/] [moduleparam.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _LINUX_MODULE_PARAMS_H
2
#define _LINUX_MODULE_PARAMS_H
3
/* Macros for (very simple) module parameter compatibility with 2.6. */
4
#include <linux/module.h>
5
 
6
/* type is byte, short, ushort, int, uint, long, ulong, bool. (2.6
7
   has more, but they are not supported).  perm is permissions when
8
   it appears in sysfs: 0 means doens't appear, 0444 means read-only
9
   by everyone, 0644 means changable dynamically by root, etc.  name
10
   must be in scope (unlike MODULE_PARM).
11
*/
12
#define module_param(name, type, perm)                                       \
13
        static inline void *__check_existence_##name(void) { return &name; } \
14
        MODULE_PARM(name, _MODULE_PARM_STRING_ ## type)
15
 
16
#define _MODULE_PARM_STRING_byte "b"
17
#define _MODULE_PARM_STRING_short "h"
18
#define _MODULE_PARM_STRING_ushort "h"
19
#define _MODULE_PARM_STRING_int "i"
20
#define _MODULE_PARM_STRING_uint "i"
21
#define _MODULE_PARM_STRING_long "l"
22
#define _MODULE_PARM_STRING_ulong "l"
23
#define _MODULE_PARM_STRING_bool "i"
24
 
25
#endif /* _LINUX_MODULE_PARAM_TYPES_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.