diff options
Diffstat (limited to 'include/linux/uio_driver.h')
-rw-r--r-- | include/linux/uio_driver.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index 665517c05eaf..1ad4724458de 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
@@ -14,16 +14,19 @@ | |||
14 | #ifndef _UIO_DRIVER_H_ | 14 | #ifndef _UIO_DRIVER_H_ |
15 | #define _UIO_DRIVER_H_ | 15 | #define _UIO_DRIVER_H_ |
16 | 16 | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
20 | 19 | ||
20 | struct module; | ||
21 | struct uio_map; | 21 | struct uio_map; |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * struct uio_mem - description of a UIO memory region | 24 | * struct uio_mem - description of a UIO memory region |
25 | * @name: name of the memory region for identification | 25 | * @name: name of the memory region for identification |
26 | * @addr: address of the device's memory | 26 | * @addr: address of the device's memory (phys_addr is used since |
27 | * addr can be logical, virtual, or physical & phys_addr_t | ||
28 | * should always be large enough to handle any of the | ||
29 | * address types) | ||
27 | * @size: size of IO | 30 | * @size: size of IO |
28 | * @memtype: type of memory addr points to | 31 | * @memtype: type of memory addr points to |
29 | * @internal_addr: ioremap-ped version of addr, for driver internal use | 32 | * @internal_addr: ioremap-ped version of addr, for driver internal use |
@@ -31,7 +34,7 @@ struct uio_map; | |||
31 | */ | 34 | */ |
32 | struct uio_mem { | 35 | struct uio_mem { |
33 | const char *name; | 36 | const char *name; |
34 | unsigned long addr; | 37 | phys_addr_t addr; |
35 | unsigned long size; | 38 | unsigned long size; |
36 | int memtype; | 39 | int memtype; |
37 | void __iomem *internal_addr; | 40 | void __iomem *internal_addr; |
@@ -98,11 +101,11 @@ extern int __must_check | |||
98 | __uio_register_device(struct module *owner, | 101 | __uio_register_device(struct module *owner, |
99 | struct device *parent, | 102 | struct device *parent, |
100 | struct uio_info *info); | 103 | struct uio_info *info); |
101 | static inline int __must_check | 104 | |
102 | uio_register_device(struct device *parent, struct uio_info *info) | 105 | /* use a define to avoid include chaining to get THIS_MODULE */ |
103 | { | 106 | #define uio_register_device(parent, info) \ |
104 | return __uio_register_device(THIS_MODULE, parent, info); | 107 | __uio_register_device(THIS_MODULE, parent, info) |
105 | } | 108 | |
106 | extern void uio_unregister_device(struct uio_info *info); | 109 | extern void uio_unregister_device(struct uio_info *info); |
107 | extern void uio_event_notify(struct uio_info *info); | 110 | extern void uio_event_notify(struct uio_info *info); |
108 | 111 | ||