From patchwork Mon Nov 23 10:16:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 7679581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 30816BF90C for ; Mon, 23 Nov 2015 10:21:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 60129205FC for ; Mon, 23 Nov 2015 10:21:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 977E3205EB for ; Mon, 23 Nov 2015 10:20:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a0oD5-00076p-54; Mon, 23 Nov 2015 10:18:59 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a0oCc-0006zG-Np for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2015 10:18:32 +0000 Received: by wmww144 with SMTP id w144so17825561wmw.1 for ; Mon, 23 Nov 2015 02:18:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=WcssgxkzPIUBu0PqAh9bIdVC4Zyep1duvL5ZDTf0siY=; b=mGqxPGwscJztdQDI1VzPrkWpE5k2cOE4SqZWrrkNVogD2PmS3CHYcghxchH5B1OE8g iUKAmEMb6UY3TpvbH+eUC3E2QLcp0hkyGhHZl5YQOxO2VgRIhu5f2guBgVZbatX0UP4Z yyISUfW+ytHk1aHg+pY45SCG2a1JWDg1JVpmOZG5zc9cilxpJDsk3e8wVaWWHJAPDV3t EzU7hdkgfjpgIAMC82Funh3zmVOhzsoaa/y57AG8Q1Wm+n1wG4KCJ2q0yb04nRmUaGIL L4E5vk7I7N2hxTWoLZHqYlSrA1EHlijLkqc3fDAR42qrFt85cRT7EqOADQjVO7cqil8C /xUg== X-Received: by 10.194.87.99 with SMTP id w3mr29347369wjz.76.1448273889141; Mon, 23 Nov 2015 02:18:09 -0800 (PST) Received: from localhost.localdomain ([212.91.95.170]) by smtp.gmail.com with ESMTPSA id kw2sm9114299wjb.42.2015.11.23.02.18.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Nov 2015 02:18:08 -0800 (PST) From: Carlo Caione To: robh+dt@kernel.org, devicetree@vger.kernel.org, jiang.liu@linux.intel.com, marc.zyngier@arm.com, tglx@linutronix.de, linus.walleij@linaro.org, b.galvani@gmail.com, linux-arm-kernel@lists.infradead.org, linux-meson@googlegroups.com, drake@endlessm.com, jerry.cao@amlogic.com, victor.wan@amlogic.com Subject: [PATCH v2 2/5] irqdomain: introduce irq_of_phandle_args_to_fwspec Date: Mon, 23 Nov 2015 11:16:53 +0100 Message-Id: <1448273816-11290-3-git-send-email-carlo@caione.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1448273816-11290-1-git-send-email-carlo@caione.org> References: <1448273816-11290-1-git-send-email-carlo@caione.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151123_021831_065401_9C11122B X-CRM114-Status: GOOD ( 11.78 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlo Caione MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Carlo Caione Export of_phandle_args_to_fwspec with a new compliant name. Signed-off-by: Carlo Caione --- include/linux/of_irq.h | 2 ++ kernel/irq/irqdomain.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 6f879c6..66bd92e 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -34,6 +34,8 @@ static inline int of_irq_parse_oldworld(struct device_node *device, int index, extern int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq); extern int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_args *out_irq); +extern void irq_of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, + struct irq_fwspec *fwspec); extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data); extern int of_irq_to_resource(struct device_node *dev, int index, struct resource *r); diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 22aa961..b2ff223 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -554,7 +554,7 @@ static int irq_domain_translate(struct irq_domain *d, return 0; } -static void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, +void irq_of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, struct irq_fwspec *fwspec) { int i; @@ -565,6 +565,7 @@ static void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, for (i = 0; i < irq_data->args_count; i++) fwspec->param[i] = irq_data->args[i]; } +EXPORT_SYMBOL_GPL(irq_of_phandle_args_to_fwspec); unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) { @@ -618,7 +619,7 @@ unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data) { struct irq_fwspec fwspec; - of_phandle_args_to_fwspec(irq_data, &fwspec); + irq_of_phandle_args_to_fwspec(irq_data, &fwspec); return irq_create_fwspec_mapping(&fwspec); } EXPORT_SYMBOL_GPL(irq_create_of_mapping);