Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
genirq: Provide locked setter for chip, handler, name
genirq: Provide a lockdep helper
genirq; Remove the last leftovers of the old sparse irq code

+34 -27
+34 -13
include/linux/irqdesc.h
··· 100 extern struct irq_desc irq_desc[NR_IRQS]; 101 #endif 102 103 - /* Will be removed once the last users in power and sh are gone */ 104 - extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node); 105 - static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node) 106 - { 107 - return desc; 108 - } 109 - 110 #ifdef CONFIG_GENERIC_HARDIRQS 111 112 static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) ··· 171 return desc->action != NULL; 172 } 173 174 #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT 175 static inline int irq_balancing_disabled(unsigned int irq) 176 { 177 struct irq_desc *desc; ··· 210 } 211 #endif 212 213 - /* caller has locked the irq_desc and both params are valid */ 214 - static inline void __set_irq_handler_unlocked(int irq, 215 - irq_flow_handler_t handler) 216 { 217 - struct irq_desc *desc; 218 219 - desc = irq_to_desc(irq); 220 - desc->handle_irq = handler; 221 } 222 223 #ifdef CONFIG_IRQ_PREFLOW_FASTEOI
··· 100 extern struct irq_desc irq_desc[NR_IRQS]; 101 #endif 102 103 #ifdef CONFIG_GENERIC_HARDIRQS 104 105 static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) ··· 178 return desc->action != NULL; 179 } 180 181 + /* caller has locked the irq_desc and both params are valid */ 182 + static inline void __irq_set_handler_locked(unsigned int irq, 183 + irq_flow_handler_t handler) 184 + { 185 + struct irq_desc *desc; 186 + 187 + desc = irq_to_desc(irq); 188 + desc->handle_irq = handler; 189 + } 190 + 191 + /* caller has locked the irq_desc and both params are valid */ 192 + static inline void 193 + __irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip, 194 + irq_flow_handler_t handler, const char *name) 195 + { 196 + struct irq_desc *desc; 197 + 198 + desc = irq_to_desc(irq); 199 + irq_desc_get_irq_data(desc)->chip = chip; 200 + desc->handle_irq = handler; 201 + desc->name = name; 202 + } 203 + 204 #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT 205 + static inline void __set_irq_handler_unlocked(int irq, 206 + irq_flow_handler_t handler) 207 + { 208 + __irq_set_handler_locked(irq, handler); 209 + } 210 + 211 static inline int irq_balancing_disabled(unsigned int irq) 212 { 213 struct irq_desc *desc; ··· 188 } 189 #endif 190 191 + static inline void 192 + irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) 193 { 194 + struct irq_desc *desc = irq_to_desc(irq); 195 196 + if (desc) 197 + lockdep_set_class(&desc->lock, class); 198 } 199 200 #ifdef CONFIG_IRQ_PREFLOW_FASTEOI
-14
kernel/irq/irqdesc.c
··· 198 return -ENOMEM; 199 } 200 201 - struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node) 202 - { 203 - int res = irq_alloc_descs(irq, irq, 1, node); 204 - 205 - if (res == -EEXIST || res == irq) 206 - return irq_to_desc(irq); 207 - return NULL; 208 - } 209 - 210 static int irq_expand_nr_irqs(unsigned int nr) 211 { 212 if (nr > IRQ_BITMAP_BITS) ··· 272 struct irq_desc *irq_to_desc(unsigned int irq) 273 { 274 return (irq < NR_IRQS) ? irq_desc + irq : NULL; 275 - } 276 - 277 - struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node) 278 - { 279 - return irq_to_desc(irq); 280 } 281 282 static void free_desc(unsigned int irq)
··· 198 return -ENOMEM; 199 } 200 201 static int irq_expand_nr_irqs(unsigned int nr) 202 { 203 if (nr > IRQ_BITMAP_BITS) ··· 281 struct irq_desc *irq_to_desc(unsigned int irq) 282 { 283 return (irq < NR_IRQS) ? irq_desc + irq : NULL; 284 } 285 286 static void free_desc(unsigned int irq)