From patchwork Mon Jun 17 09:07:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 251792 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 27D3C2C0174 for ; Mon, 17 Jun 2013 19:22:32 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755919Ab3FQJW3 (ORCPT ); Mon, 17 Jun 2013 05:22:29 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:51764 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750928Ab3FQJW2 (ORCPT ); Mon, 17 Jun 2013 05:22:28 -0400 Received: by mail-pb0-f50.google.com with SMTP id wz7so2573237pbc.9 for ; Mon, 17 Jun 2013 02:22:28 -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:in-reply-to:references :x-gm-message-state; bh=vVQC4VvYLT4QPD4kAu/a4ZaRj7v3Yhbv01e0UI5htVY=; b=LiNvAbP5bPJNOGDxwMtJr9slQQzadb5Pc+sRpqYhCS6tznUg4E//dck5pIAeeLaTuz DIXVhgDRAIR2qXlzDtEUaJdqwLdbF3SNgLxfxfqRRzuXdwMmU9LkZyJtfcvir05Y9zlS LocOI5IFWc3tQvSsdGFSXkp5TQSHkJ3l8gXDkazQVVMnMjReWwUkqmKn73nM71JlIlSZ Rsi7WnNICzLSnkjQkL01ROe6VPSe65KnbeL1AU8LUWzJiyhH+jDhNaJNnwa0dkxbixm2 GRmnk7uTho8EiGmDlmXh32038PEBqc/cBIoG/4DWFCSKPV5VVjbx6XNINVSQbK3XsT2A SbQQ== X-Received: by 10.68.104.196 with SMTP id gg4mr12183062pbb.25.1371460948252; Mon, 17 Jun 2013 02:22:28 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id u6sm13109970pbb.46.2013.06.17.02.22.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 02:22:27 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: thierry.reding@gmail.com, patches@linaro.org, sachin.kamat@linaro.org, sparclinux@vger.kernel.org, "David S. Miller" Subject: [PATCH V2 1/15] sparc,leon: Convert to use devm_ioremap_resource Date: Mon, 17 Jun 2013 14:37:44 +0530 Message-Id: <1371460064-19549-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370864113-17895-2-git-send-email-tushar.behera@linaro.org> References: <1370864113-17895-2-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQnpP0cm3TZuOqR5fIxCaMzajLXMeDQT5JCFCXhnCRv2oamczSW5C9Hkko/GGYeC5+SBQ8Bm Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()") introduced devm_ioremap_resource() and deprecated the use of devm_request_and_ioremap(). While at it, also remove the error message as devm_ioremap_resource() also prints similar error message. Signed-off-by: Tushar Behera CC: sparclinux@vger.kernel.org CC: "David S. Miller" --- Changes for V2: * Removed redundant error message. arch/sparc/kernel/leon_pci_grpci1.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c index 7739a54..6df26e3 100644 --- a/arch/sparc/kernel/leon_pci_grpci1.c +++ b/arch/sparc/kernel/leon_pci_grpci1.c @@ -536,11 +536,9 @@ static int grpci1_of_probe(struct platform_device *ofdev) /* find device register base address */ res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); - regs = devm_request_and_ioremap(&ofdev->dev, res); - if (!regs) { - dev_err(&ofdev->dev, "io-regs mapping failed\n"); - return -EADDRNOTAVAIL; - } + regs = devm_ioremap_resource(&ofdev->dev, res); + if (IS_ERR(regs)) + return PTR_ERR(regs); /* * check that we're in Host Slot and that we can act as a Host Bridge