From patchwork Sat Apr 20 13:56:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2468001 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 637243FD8C for ; Sat, 20 Apr 2013 13:58:35 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UTYHy-0006P0-8d; Sat, 20 Apr 2013 13:57:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UTYHJ-0006Tu-28; Sat, 20 Apr 2013 13:56:33 +0000 Received: from mail-lb0-f171.google.com ([209.85.217.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UTYGw-0006S1-Bk for linux-arm-kernel@lists.infradead.org; Sat, 20 Apr 2013 13:56:11 +0000 Received: by mail-lb0-f171.google.com with SMTP id v10so4509323lbd.16 for ; Sat, 20 Apr 2013 06:56:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=00Mc7ptxo+wAAfvHRQarlz8czWDWsca3fNIOaqp+o+0=; b=eyug7Ly0K7deZ6ieEpWzne1znfXgeVVjRPetEnpL5C3wR/0x7sl19X+bsiFV86PloA 6NrHXt3ct66bNhezaJXuzRV1UF6wPs1pZOkt78bGDzicG9Otje1ULEjhj9eD8QvRvOxG 4SZIyg3TFBlTDo2eFWGKvBhacNcQNCpdcvsJG2HkikGG9ozSNKvYE29Td+/27Cxfi+P4 QnmLhOb+15CoLbf9uTPiVgaYhVyg9PBf12I6U6biXLWj8EMtMR1g0I3OhJ5Ae8Y9NVMt ftNTfbrXqdEIHcBAN0KHN6sKj3wrXtBywuEWMtoVQvYsBJSzerxRJKXLRJa31EI6VpKF ILHw== X-Received: by 10.112.139.130 with SMTP id qy2mr10081367lbb.34.1366466166694; Sat, 20 Apr 2013 06:56:06 -0700 (PDT) Received: from localhost.localdomain (c83-249-208-67.bredband.comhem.se. [83.249.208.67]) by mx.google.com with ESMTPS id i4sm1970404lag.1.2013.04.20.06.56.05 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 20 Apr 2013 06:56:05 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH 05/12] ARM: integrator: grab PCI error IRQ in probe() Date: Sat, 20 Apr 2013 15:56:03 +0200 Message-Id: <1366466163-15492-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-Gm-Message-State: ALoCoQm37neduHdBa9t1iVaeKOROMsS2CXky52C7g6VJowBdBX+k2yD6PkuWWZoHlVbUvZogNFss X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130420_095610_588451_8E369B23 X-CRM114-Status: GOOD ( 12.94 ) 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.217.171 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Linus Walleij X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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 This moves the request of the PCI error interrupt to the probe() function for the device, uses the devm* managed call and switch to a dev_err() error print. Acked-by: Arnd Bergmann Signed-off-by: Linus Walleij --- arch/arm/mach-integrator/pci_v3.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 2733c6c..f027596 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -495,7 +495,6 @@ static void __init pci_v3_preinit(void) { unsigned long flags; unsigned int temp; - int ret; /* Remap the Integrator system controller */ ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100); @@ -579,14 +578,6 @@ static void __init pci_v3_preinit(void) v3_writeb(V3_LB_IMASK, 0x28); __raw_writel(3, ap_syscon_base + INTEGRATOR_SC_PCIENABLE_OFFSET); - /* - * Grab the PCI error interrupt. - */ - ret = request_irq(IRQ_AP_V3INT, v3_irq, 0, "V3", NULL); - if (ret) - printk(KERN_ERR "PCI: unable to grab PCI error " - "interrupt: %d\n", ret); - raw_spin_unlock_irqrestore(&v3_lock, flags); } @@ -684,7 +675,17 @@ static struct hw_pci pci_v3 __initdata = { static int __init pci_v3_probe(struct platform_device *pdev) { + int ret; + + ret = devm_request_irq(&pdev->dev, IRQ_AP_V3INT, v3_irq, 0, "V3", NULL); + if (ret) { + dev_err(&pdev->dev, "unable to grab PCI error interrupt: %d\n", + ret); + return -ENODEV; + } + pci_common_init(&pci_v3); + return 0; }