From patchwork Wed Jan 2 10:00:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13761 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 B7CF623E39 for ; Wed, 2 Jan 2013 10:06:33 +0000 (UTC) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by fiordland.canonical.com (Postfix) with ESMTP id 58257A192D6 for ; Wed, 2 Jan 2013 10:06:33 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id n11so14312999vch.30 for ; Wed, 02 Jan 2013 02:06:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:x-gm-message-state; bh=Faql9PqIyxeWDeEdqWzvlDIWrQk5pzTAYZSjWYFcmyM=; b=VNYS+RXlxHYA0/SgqX6wlVRx9ckbnVVnlfyiiNsBO3IEmwgqMM+k8CK/VZ3s7/Wy5x 4Ab4G/u4qkY2XeABXRMH1aHsPq2fA3f20efMFaApflbT6OdIhX3W6KXxrfVZx5pDAJGV u4cPtffXZzx0SX+TuQ3seKrGfXl+HhCXYRWtk0t9zjzSzGfz1StexlRsUoOIqIktnCAc oUYS9RzikvNSflO0fx0eyFZQszHr6U1kCrc4RK+x9KV0t32EKzKqCmsAIu2FzvYMZG1a tiKYzbXAifPSNzgMBMC4enOg5NOn7KdpIvfbkyf3g3b46GOC0/Dy1DrngCdsf+A2czqG BGFw== X-Received: by 10.58.198.164 with SMTP id jd4mr72531662vec.34.1357121192824; Wed, 02 Jan 2013 02:06:32 -0800 (PST) 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.58.145.101 with SMTP id st5csp39022veb; Wed, 2 Jan 2013 02:06:31 -0800 (PST) X-Received: by 10.204.133.219 with SMTP id g27mr21754762bkt.65.1357121191166; Wed, 02 Jan 2013 02:06:31 -0800 (PST) Received: from eu1sys200aog109.obsmtp.com (eu1sys200aog109.obsmtp.com [207.126.144.127]) by mx.google.com with SMTP id ie17si76356197bkc.95.2013.01.02.02.06.03 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 02:06:31 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.127 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.127; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.127 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob109.postini.com ([207.126.147.11]) with SMTP ID DSNKUOQFSzMsGvLopJpzSXVaOEPaWYKn/kqL@postini.com; Wed, 02 Jan 2013 10:06:30 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 9E76DDC; Wed, 2 Jan 2013 09:52:28 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 5E042E2E; Wed, 2 Jan 2013 10:00:39 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 8A42924C30B; Wed, 2 Jan 2013 11:00:33 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 2 Jan 2013 11:00:38 +0100 From: Linus Walleij To: Samuel Ortiz , Cc: Anmar Oueja , Linus Walleij , , Lee Jones Subject: [PATCH] mfd: tc3589x: use simple irqdomain Date: Wed, 2 Jan 2013 11:00:35 +0100 Message-ID: <1357120835-14748-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkX3jJSj/dsDMu5fYBcnuga9fDza1l3Oc2k1HVVrZKn5m89ugH60g3KEdcmLbAsKKL06CeL This fixes a regression in the TC3589x driver introduced in commit 15e27b1088245a2de3b7d09d39cd209212eb16af "mfd: Provide the tc3589x with its own IRQ domain" If a system with a TC3589x expander is booted from device tree, but a base IRQ is anyway passed from platform data, a linear IRQ domain will be used, while a legacy domain is actually desired. Fix this by switching to using the simple irqdomain that will handle this uniformly and also allocates descriptors explicitly. Also fix two small whitespace errors in the vicinity while we're at it. Cc: stable@kernel.org Cc: Lee Jones Signed-off-by: Linus Walleij --- Hi Sam, this should go into the fixes for stable unless issues are found, it fixes a regression for us. --- drivers/mfd/tc3589x.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index a06d66b..ecc092c 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -219,25 +219,18 @@ static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq) } static struct irq_domain_ops tc3589x_irq_ops = { - .map = tc3589x_irq_map, + .map = tc3589x_irq_map, .unmap = tc3589x_irq_unmap, - .xlate = irq_domain_xlate_twocell, + .xlate = irq_domain_xlate_twocell, }; static int tc3589x_irq_init(struct tc3589x *tc3589x, struct device_node *np) { int base = tc3589x->irq_base; - if (base) { - tc3589x->domain = irq_domain_add_legacy( - NULL, TC3589x_NR_INTERNAL_IRQS, base, - 0, &tc3589x_irq_ops, tc3589x); - } - else { - tc3589x->domain = irq_domain_add_linear( - np, TC3589x_NR_INTERNAL_IRQS, - &tc3589x_irq_ops, tc3589x); - } + tc3589x->domain = irq_domain_add_simple( + np, TC3589x_NR_INTERNAL_IRQS, base, + &tc3589x_irq_ops, tc3589x); if (!tc3589x->domain) { dev_err(tc3589x->dev, "Failed to create irqdomain\n");