interrupt.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. linux/interrupt.h compatibility header
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. */
  15. #ifndef __COMPAT_LINUX_INTERRUPT_H_
  16. #define __COMPAT_LINUX_INTERRUPT_H_
  17. #include <linux/version.h>
  18. #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23)
  19. typedef void irqreturn_t;
  20. #define IRQ_NONE
  21. #define IRQ_HANDLED
  22. #define IRQ_RETVAL(x) (void)(x)
  23. #endif
  24. /* if interrupt handler prototype has pt_regs* parameter */
  25. #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
  26. #define PT_REGS_ARG , struct pt_regs *regs
  27. #define HAVE_PT_REGS
  28. #else
  29. #define PT_REGS_ARG
  30. #undef HAVE_PT_REGS
  31. #endif
  32. #include_next <linux/interrupt.h>
  33. #ifndef IRQF_SHARED
  34. #define IRQF_SHARED SA_SHIRQ
  35. #endif
  36. #endif