diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-10 05:36:33 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:06 -0500 |
commit | a0cd9ca2b907d7ee26575e7b63ac92dad768a75e (patch) | |
tree | 4b46f7951b9cd76531caf6d4d68d687e1b622336 /include/linux/irqdesc.h | |
parent | 43abe43ce0619d744c7a5bb15cce075e532b53b7 (diff) |
genirq: Namespace cleanup
The irq namespace has become quite convoluted. My bad. Clean it up
and deprecate the old functions. All new functions follow the scheme:
irq number based:
irq_set/get/xxx/_xxx(unsigned int irq, ...)
irq_data based:
irq_data_set/get/xxx/_xxx(struct irq_data *d, ....)
irq_desc based:
irq_desc_get_xxx(struct irq_desc *desc)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irqdesc.h')
-rw-r--r-- | include/linux/irqdesc.h | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index bfef56dadddb..64794dec93b6 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -98,10 +98,46 @@ static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node) | |||
98 | 98 | ||
99 | #ifdef CONFIG_GENERIC_HARDIRQS | 99 | #ifdef CONFIG_GENERIC_HARDIRQS |
100 | 100 | ||
101 | #define get_irq_desc_chip(desc) ((desc)->irq_data.chip) | 101 | static inline struct irq_chip *irq_desc_get_chip(struct irq_desc *desc) |
102 | #define get_irq_desc_chip_data(desc) ((desc)->irq_data.chip_data) | 102 | { |
103 | #define get_irq_desc_data(desc) ((desc)->irq_data.handler_data) | 103 | return desc->irq_data.chip; |
104 | #define get_irq_desc_msi(desc) ((desc)->irq_data.msi_desc) | 104 | } |
105 | |||
106 | static inline void *irq_desc_get_chip_data(struct irq_desc *desc) | ||
107 | { | ||
108 | return desc->irq_data.chip_data; | ||
109 | } | ||
110 | |||
111 | static inline void *irq_desc_get_handler_data(struct irq_desc *desc) | ||
112 | { | ||
113 | return desc->irq_data.handler_data; | ||
114 | } | ||
115 | |||
116 | static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) | ||
117 | { | ||
118 | return desc->irq_data.msi_desc; | ||
119 | } | ||
120 | |||
121 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
122 | static inline struct irq_chip *get_irq_desc_chip(struct irq_desc *desc) | ||
123 | { | ||
124 | return irq_desc_get_chip(desc); | ||
125 | } | ||
126 | static inline void *get_irq_desc_data(struct irq_desc *desc) | ||
127 | { | ||
128 | return irq_desc_get_handler_data(desc); | ||
129 | } | ||
130 | |||
131 | static inline void *get_irq_desc_chip_data(struct irq_desc *desc) | ||
132 | { | ||
133 | return irq_desc_get_chip_data(desc); | ||
134 | } | ||
135 | |||
136 | static inline struct msi_desc *get_irq_desc_msi(struct irq_desc *desc) | ||
137 | { | ||
138 | return irq_desc_get_msi_desc(desc); | ||
139 | } | ||
140 | #endif | ||
105 | 141 | ||
106 | /* | 142 | /* |
107 | * Architectures call this to let the generic IRQ layer | 143 | * Architectures call this to let the generic IRQ layer |