From patchwork Tue Jul 23 18:01:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 2832121 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0C2BEC0319 for ; Tue, 23 Jul 2013 18:04:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF9332026F for ; Tue, 23 Jul 2013 18:04:03 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A490B2026D for ; Tue, 23 Jul 2013 18:04:02 +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 1V1gw3-00088X-EV; Tue, 23 Jul 2013 18:03:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V1gvr-0002nb-HY; Tue, 23 Jul 2013 18:03:31 +0000 Received: from sauhun.de ([89.238.76.85] helo=pokefinder.org) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V1gvP-0002jp-2e for linux-arm-kernel@lists.infradead.org; Tue, 23 Jul 2013 18:03:04 +0000 Received: from p5b387ff2.dip0.t-ipconnect.de ([91.56.127.242]:32629 helo=localhost) by pokefinder.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1V1gv4-0001Qo-0X; Tue, 23 Jul 2013 20:02:42 +0200 From: Wolfram Sang To: linux-kernel@vger.kernel.org Subject: [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource Date: Tue, 23 Jul 2013 20:01:39 +0200 Message-Id: <1374602524-3398-7-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1374602524-3398-1-git-send-email-wsa@the-dreams.de> References: <1374602524-3398-1-git-send-email-wsa@the-dreams.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130723_140303_313491_10B93973 X-CRM114-Status: UNSURE ( 7.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.6 (/) Cc: Linus Walleij , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Wolfram Sang 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 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SUSPICIOUS_RECIPS, UNPARSEABLE_RELAY autolearn=no 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 devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang Acked-by: Linus Walleij --- Please apply via the subsystem-tree. drivers/i2c/busses/i2c-stu300.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index d1a6b20..ded21cf 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c @@ -884,9 +884,6 @@ stu300_probe(struct platform_device *pdev) dev->pdev = pdev; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENOENT; - dev->virtbase = devm_ioremap_resource(&pdev->dev, res); dev_dbg(&pdev->dev, "initialize bus device I2C%d on virtual " "base %p\n", bus_nr, dev->virtbase);