From patchwork Mon Aug 20 10:53:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1348021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id BE81CDFF0F for ; Mon, 20 Aug 2012 10:56:15 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T3PcG-000284-Fj; Mon, 20 Aug 2012 10:53:52 +0000 Received: from mail-wi0-f177.google.com ([209.85.212.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T3PcC-00026B-D8 for linux-arm-kernel@lists.infradead.org; Mon, 20 Aug 2012 10:53:49 +0000 Received: by wibhn17 with SMTP id hn17so2721579wib.0 for ; Mon, 20 Aug 2012 03:53:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=olulqR7cFKTDLUyCTRop0FD2ImsVbG82MPF5Aqr9OqA=; b=QQk/G5VYX5a1ZRbSAsAEusKAqlaWuAL+9iCdTiaLNqLig0D3EEEpd7W53nc+rsil63 sx6HcjyCXaQ4SvmAKjqdD729dxaBxxqERJq3PTL2NSfbY99Pard53JdSNGcVppYGN0Fl /BLLTJJbZr7N3ZcC8a8DHCeLSitU91GBgUA//jF9Tye8srkFh82OEpedBzfxSFLN4WJ9 loyPQWsXcltcwsJ1uo4i4fuk4TA1Q4ChZMPobbnQ4v7NoUjx7Mx6anSPepHxBRtfhuEq Dfpb7rZ55gHuq76Vw1Fyk8dd123YA3TBZPK3hPnMAefPh6OAEQyPoMVfyzkMpU3JXCQG qJrw== Received: by 10.216.29.17 with SMTP id h17mr6985157wea.221.1345460026501; Mon, 20 Aug 2012 03:53:46 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id ef5sm40740378wib.3.2012.08.20.03.53.45 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Aug 2012 03:53:45 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mfd: ab8500: Make ab8500_irq_get_virq() static Date: Mon, 20 Aug 2012 11:53:36 +0100 Message-Id: <1345460017-404-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQlu6h7glwd0jmA0eG26z+tTD3OkppXs8/3CP5FfHKMFIwrCMa5/aYBlESDvAnkpN+yY4sp1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.177 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: STEricsson_nomadik_linux@list.st.com, Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de, sameo@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org MFD core now takes care of HWIRQ <-> VIRQ mapping, so the helper ab8500_irq_get_virq() is no longer used by ab8500 subordinate devices to obtain a Linux wide Virtual IRQ. The AB8500 IRQ controller still uses it internally though, so we'll just hide it from the rest of the world by making it static instead. Signed-off-by: Lee Jones Reviewed-by: Linus Walleij --- drivers/mfd/ab8500-core.c | 33 ++++++++++++++++----------------- include/linux/mfd/abx500/ab8500.h | 2 -- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 71a7757..020c1a8 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -472,6 +472,22 @@ static irqreturn_t ab8500_hierarchical_irq(int irq, void *dev) return IRQ_HANDLED; } +/** + * ab8500_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ + * + * @ab8500: ab8500_irq controller to operate on. + * @irq: index of the interrupt requested in the chip IRQs + * + * Useful for drivers to request their own IRQs. + */ +static int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq) +{ + if (!ab8500) + return -EINVAL; + + return irq_create_mapping(ab8500->domain, irq); +} + static irqreturn_t ab8500_irq(int irq, void *dev) { struct ab8500 *ab8500 = dev; @@ -512,23 +528,6 @@ static irqreturn_t ab8500_irq(int irq, void *dev) return IRQ_HANDLED; } -/** - * ab8500_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ - * - * @ab8500: ab8500_irq controller to operate on. - * @irq: index of the interrupt requested in the chip IRQs - * - * Useful for drivers to request their own IRQs. - */ -int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq) -{ - if (!ab8500) - return -EINVAL; - - return irq_create_mapping(ab8500->domain, irq); -} -EXPORT_SYMBOL_GPL(ab8500_irq_get_virq); - static int ab8500_irq_map(struct irq_domain *d, unsigned int virq, irq_hw_number_t hwirq) { diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 3764cb6..1491044 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h @@ -341,6 +341,4 @@ static inline int is_ab8500_2p0(struct ab8500 *ab) return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0)); } -int ab8500_irq_get_virq(struct ab8500 *ab8500, int irq); - #endif /* MFD_AB8500_H */