From patchwork Thu Apr 2 15:41:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 6150461 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 18EFFBF4A6 for ; Thu, 2 Apr 2015 15:48:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A10E203AF for ; Thu, 2 Apr 2015 15:48:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6930A20398 for ; Thu, 2 Apr 2015 15:48:46 +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 1YdhIz-0007M0-L8; Thu, 02 Apr 2015 15:45:17 +0000 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YdhGD-00052y-FF for linux-arm-kernel@lists.infradead.org; Thu, 02 Apr 2015 15:42:26 +0000 Received: by pdbnk13 with SMTP id nk13so12869075pdb.0 for ; Thu, 02 Apr 2015 08:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qPmUooAOQ0dXZ1c/upzxnUBhT8NcYBunfd01BV3VYy8=; b=vaL3Ml0CgnwuUWqQ0xRmBs9rPKdJML235zcE7ORS5dSS0ZzGXX2K044i+PELI1vM1i O1fc2rALkzgdVrpgRdhR5VU0pYzChB1GsUskSb8By9IVaizEe/DLdrTWi3mZS4WstVyN fgacOuK2TX+RP3gCTg0wyZtQGkZe4oQlZkKEs05ZIO0aliLbgUDySOZ+GDjogyuJJyVK 5anhmgtOQROMLl6mHIVwpP9agO2lNwNi+Vvc4JALxbkVC67cuunnqJqH42dgrjhuf8Z6 jFho0+WpkciM66+xAQXaCQ3GV7tAirDRAFSopHzMR1qGCDAcXY0PEEUAIt2DcVIYU4P5 6G6Q== X-Received: by 10.70.53.3 with SMTP id x3mr87965201pdo.133.1427989322006; Thu, 02 Apr 2015 08:42:02 -0700 (PDT) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id 5sm5597633pdg.45.2015.04.02.08.41.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Apr 2015 08:42:01 -0700 (PDT) From: Dmitry Eremin-Solenikov To: Russell King , Samuel Ortiz , Lee Jones Subject: [PATCH 3/3] mfd: ucb1x00: make use of provided irq Date: Thu, 2 Apr 2015 18:41:47 +0300 Message-Id: <1427989307-1805-3-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427989307-1805-1-git-send-email-dbaryshkov@gmail.com> References: <1427989307-1805-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150402_084225_563808_8E69F7E2 X-CRM114-Status: GOOD ( 10.51 ) X-Spam-Score: -0.8 (/) Cc: linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 If the platform data provides IRQ information, use that instead always probing the IRQ. Signed-off-by: Dmitry Eremin-Solenikov --- drivers/mfd/ucb1x00-core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index cd4d39e..9b3c86b 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c @@ -465,9 +465,12 @@ static int ucb1x00_probe(struct mcp *mcp) if (ret) goto err_dev_add; - ucb1x00_enable(ucb); - ucb->irq = ucb1x00_detect_irq(ucb); - ucb1x00_disable(ucb); + ucb->irq = pdata ? pdata->irq : NO_IRQ; + if (ucb->irq == NO_IRQ) { + ucb1x00_enable(ucb); + ucb->irq = ucb1x00_detect_irq(ucb); + ucb1x00_disable(ucb); + } if (ucb->irq == NO_IRQ) { dev_err(&ucb->dev, "IRQ probe failed\n"); ret = -ENODEV;