Module: xenomai-head
Branch: master
Commit: ce9ee560a8d13f6e412ffe590e5cb037f04f0d34
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=ce9ee560a8d13f6e412ffe590e5cb037f04f0d34

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Sep  5 15:08:37 2011 +0200

hal: wrap get_irq_desc_chip()

---

 include/asm-generic/wrappers.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index 1940a96..9c44042 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -637,6 +637,11 @@ static inline void wrap_proc_dir_entry_owner(struct 
proc_dir_entry *entry)
 #endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) && 
defined(CONFIG_GENERIC_HARDIRQS)
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
+#define irq_desc_get_chip(desc)        get_irq_desc_chip(desc)
+#endif
+
 /*
  * The irq chip descriptor has been heavily revamped in
  * 2.6.37. Provide generic accessors to the chip handlers we need for
@@ -645,7 +650,7 @@ static inline void wrap_proc_dir_entry_owner(struct 
proc_dir_entry *entry)
 #define rthal_irq_chip_enable(irq)                                     \
        ({                                                              \
                struct irq_desc *desc = rthal_irq_descp(irq);           \
-               struct irq_chip *chip = get_irq_desc_chip(desc);        \
+               struct irq_chip *chip = irq_desc_get_chip(desc);        \
                int __ret__ = 0;                                        \
                if (unlikely(chip->irq_unmask == NULL))                 \
                        __ret__ = -ENODEV;                              \
@@ -656,7 +661,7 @@ static inline void wrap_proc_dir_entry_owner(struct 
proc_dir_entry *entry)
 #define rthal_irq_chip_disable(irq)                                    \
        ({                                                              \
                struct irq_desc *desc = rthal_irq_descp(irq);           \
-               struct irq_chip *chip = get_irq_desc_chip(desc);        \
+               struct irq_chip *chip = irq_desc_get_chip(desc);        \
                int __ret__ = 0;                                        \
                if (unlikely(chip->irq_mask == NULL))                   \
                        __ret__ = -ENODEV;                              \


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to