From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754750AbbGBTeC (ORCPT ); Thu, 2 Jul 2015 15:34:02 -0400 Received: from 4.mo69.mail-out.ovh.net ([46.105.42.102]:41002 "EHLO 4.mo69.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754660AbbGBTdv (ORCPT ); Thu, 2 Jul 2015 15:33:51 -0400 X-Greylist: delayed 3524 seconds by postgrey-1.27 at vger.kernel.org; Thu, 02 Jul 2015 15:33:51 EDT From: Joel Porquet To: linux-kernel@vger.kernel.org Cc: Joel Porquet , Thomas Gleixner , Jason Cooper Subject: [PATCH] irqchip: move IRQCHIP_DECLARE macro to include/linux/irqchip.h Date: Thu, 2 Jul 2015 15:32:00 -0400 Message-Id: <1435865565-14114-1-git-send-email-joel@porquet.org> X-Mailer: git-send-email 2.4.5 X-Ovh-Tracer-Id: 10527445605465026584 X-Ovh-Remote: 190.181.39.143 (static-190-181-39-143.acelerate.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekvddrfeefucetufdoteggucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekvddrfeefucetufdoteggucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At the moment the IRQCHIP_DECLARE macro is only declared locally in drivers/irqchip/irqchip.h. It prevents from using it directly in arch/* directories whenever irqchip drivers only exist there, which happens in a few cases (e.g. arc, arm, microblaze and mips). This patch makes the macro to be globally defined, i.e. in include/linux/irqchip.h, and thus usable for arch-specific declarations of irqchip drivers. In this way, it is very similar to what clocksource does (ie CLOCKSOURCE_OF_DECLARE is defined in include/linux/clocksource.h). For now, this patch only moves the declaration of the macro IRQCHIP_DECLARE to the global header 'include/linux/irqchip.h' and make 'drivers/irqchip/irqchip.h' include 'include/linux/irqchip.h'. Later, other patches will get rid of 'drivers/irqchip/irqchip.h' and modify all the impacted irqchip drivers. Signed-off-by: Joel Porquet --- drivers/irqchip/irqchip.h | 19 +------------------ include/linux/irqchip.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/irqchip/irqchip.h b/drivers/irqchip/irqchip.h index 0f6486d..0f67ae3 100644 --- a/drivers/irqchip/irqchip.h +++ b/drivers/irqchip/irqchip.h @@ -8,21 +8,4 @@ * warranty of any kind, whether express or implied. */ -#ifndef _IRQCHIP_H -#define _IRQCHIP_H - -#include - -/* - * This macro must be used by the different irqchip drivers to declare - * the association between their DT compatible string and their - * initialization function. - * - * @name: name that must be unique accross all IRQCHIP_DECLARE of the - * same file. - * @compstr: compatible string of the irqchip driver - * @fn: initialization function - */ -#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn) - -#endif +#include diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 14d7913..6388873 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -11,6 +11,20 @@ #ifndef _LINUX_IRQCHIP_H #define _LINUX_IRQCHIP_H +#include + +/* + * This macro must be used by the different irqchip drivers to declare + * the association between their DT compatible string and their + * initialization function. + * + * @name: name that must be unique accross all IRQCHIP_DECLARE of the + * same file. + * @compstr: compatible string of the irqchip driver + * @fn: initialization function + */ +#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn) + #ifdef CONFIG_IRQCHIP void irqchip_init(void); #else -- 2.4.5