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: 10800 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A0A3723F70 for ; Mon, 20 Aug 2012 10:53:49 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id C975AA1881F for ; Mon, 20 Aug 2012 10:53:43 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id i2so5181748ggm.11 for ; Mon, 20 Aug 2012 03:53:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=olulqR7cFKTDLUyCTRop0FD2ImsVbG82MPF5Aqr9OqA=; b=XJ30mmaajxKBkfQS6iEAjmwjBF3i9SCKbgW6Vwwqc51+c8eXnsNwuqE3xNufkt1d3H FkQH1bpzsGp8to9n1QY+8MHFfLwiXhLeBcfl68lkRIIPhUqujjONMzbGLid5b8ecndjx j7kswc8X2Ln9HRgDN+ZEv1+JKBsL49gjEujDfXsH+uZvTnbkLtHo10h+X5NJFN98ASMZ qSDawhuvs2+JkKVrB+ZgC3Bc09A4ieL23ww+YFQHe23FhrTbOeXiFbBS4q4uvBUiwGsQ T+yhZsZwjQw54SDJYp79VvC+vdQabOOA/Y7/E2vn/opn7hs+DkU1iulo50Wt6xwOFpK/ WlUA== Received: by 10.50.207.106 with SMTP id lv10mr9418403igc.0.1345460028427; Mon, 20 Aug 2012 03:53:48 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp77064igc; Mon, 20 Aug 2012 03:53:47 -0700 (PDT) Received: by 10.216.241.198 with SMTP id g48mr5912524wer.192.1345460027299; Mon, 20 Aug 2012 03:53:47 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id hn12si32291359wib.32.2012.08.20.03.53.46 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Aug 2012 03:53:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by wibhr14 with SMTP id hr14so2863003wib.13 for ; Mon, 20 Aug 2012 03:53:46 -0700 (PDT) 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 Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, sameo@linux.intel.com, Lee Jones 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: ALoCoQn5ZGXWUyUiBvjvKwuK7WPZHpElv4ECd1G/RGqsSonW3w7CqItHFAGCJ5Ucb/I9PxFqY0B9 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 --- 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 */