002-4.2-irqchip-Move-IRQCHIP_DECLARE-macro-to-include-linux-.patch 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. From 91e20b5040c67c51aad88cf87db4305c5bd7f79d Mon Sep 17 00:00:00 2001
  2. From: Joel Porquet <joel@porquet.org>
  3. Date: Thu, 2 Jul 2015 15:32:00 -0400
  4. Subject: [PATCH] irqchip: Move IRQCHIP_DECLARE macro to
  5. include/linux/irqchip.h
  6. At the moment the IRQCHIP_DECLARE macro is only declared locally in
  7. drivers/irqchip/irqchip.h. It prevents from using it directly in arch/*
  8. directories whenever irqchip drivers only exist there, which happens in a few
  9. cases (e.g. arc, arm, microblaze and mips).
  10. This patch makes the macro to be globally defined, i.e. in
  11. include/linux/irqchip.h, and thus usable for arch-specific declarations of
  12. irqchip drivers. In this way, it is very similar to what clocksource does (ie
  13. CLOCKSOURCE_OF_DECLARE is defined in include/linux/clocksource.h).
  14. For now, this patch only moves the declaration of the macro
  15. IRQCHIP_DECLARE to the global header 'include/linux/irqchip.h' and make
  16. 'drivers/irqchip/irqchip.h' include 'include/linux/irqchip.h'. Later, other
  17. patches will get rid of 'drivers/irqchip/irqchip.h' and modify all the impacted
  18. irqchip drivers.
  19. Signed-off-by: Joel Porquet <joel@porquet.org>
  20. Cc: Jason Cooper <jason@lakedaemon.net>
  21. Link: http://lkml.kernel.org/r/1435865565-14114-1-git-send-email-joel@porquet.org
  22. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  23. ---
  24. drivers/irqchip/irqchip.h | 19 +------------------
  25. include/linux/irqchip.h | 14 ++++++++++++++
  26. 2 files changed, 15 insertions(+), 18 deletions(-)
  27. --- a/drivers/irqchip/irqchip.h
  28. +++ b/drivers/irqchip/irqchip.h
  29. @@ -8,21 +8,4 @@
  30. * warranty of any kind, whether express or implied.
  31. */
  32. -#ifndef _IRQCHIP_H
  33. -#define _IRQCHIP_H
  34. -
  35. -#include <linux/of.h>
  36. -
  37. -/*
  38. - * This macro must be used by the different irqchip drivers to declare
  39. - * the association between their DT compatible string and their
  40. - * initialization function.
  41. - *
  42. - * @name: name that must be unique accross all IRQCHIP_DECLARE of the
  43. - * same file.
  44. - * @compstr: compatible string of the irqchip driver
  45. - * @fn: initialization function
  46. - */
  47. -#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)
  48. -
  49. -#endif
  50. +#include <linux/irqchip.h>
  51. --- a/include/linux/irqchip.h
  52. +++ b/include/linux/irqchip.h
  53. @@ -11,6 +11,20 @@
  54. #ifndef _LINUX_IRQCHIP_H
  55. #define _LINUX_IRQCHIP_H
  56. +#include <linux/of.h>
  57. +
  58. +/*
  59. + * This macro must be used by the different irqchip drivers to declare
  60. + * the association between their DT compatible string and their
  61. + * initialization function.
  62. + *
  63. + * @name: name that must be unique accross all IRQCHIP_DECLARE of the
  64. + * same file.
  65. + * @compstr: compatible string of the irqchip driver
  66. + * @fn: initialization function
  67. + */
  68. +#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)
  69. +
  70. #ifdef CONFIG_IRQCHIP
  71. void irqchip_init(void);
  72. #else