From patchwork Thu May 16 11:15:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 2576641 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork1.kernel.org (Postfix) with ESMTP id B4FDD3FE1F for ; Thu, 16 May 2013 11:15:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ucw9c-0002M4-VY; Thu, 16 May 2013 11:15:24 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ucw9a-0002Li-3G for spi-devel-general@lists.sourceforge.net; Thu, 16 May 2013 11:15:22 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of the-dreams.de designates 89.238.76.85 as permitted sender) client-ip=89.238.76.85; envelope-from=wsa@the-dreams.de; helo=pokefinder.org; Received: from sauhun.de ([89.238.76.85] helo=pokefinder.org) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Ucw9W-00008K-Qb for spi-devel-general@lists.sourceforge.net; Thu, 16 May 2013 11:15:22 +0000 Received: from p5b387862.dip0.t-ipconnect.de ([91.56.120.98]:14124 helo=localhost) by pokefinder.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Ucw9M-0006jM-Ji; Thu, 16 May 2013 13:15:08 +0200 From: Wolfram Sang To: linux-kernel@vger.kernel.org Subject: [PATCH 17/33] drivers/spi: don't check resource with devm_ioremap_resource Date: Thu, 16 May 2013 13:15:45 +0200 Message-Id: <1368702961-4325-18-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368702961-4325-1-git-send-email-wsa@the-dreams.de> References: <1368702961-4325-1-git-send-email-wsa@the-dreams.de> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1Ucw9W-00008K-Qb Cc: Stephen Warren , Wolfram Sang , linux-tegra@vger.kernel.org, Mark Brown , Grant Likely , spi-devel-general@lists.sourceforge.net X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang --- drivers/spi/spi-tegra20-sflash.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index d65c000..09df8e2 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c @@ -489,11 +489,6 @@ static int tegra_sflash_probe(struct platform_device *pdev) tegra_sflash_parse_dt(tsd); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r) { - dev_err(&pdev->dev, "No IO memory resource\n"); - ret = -ENODEV; - goto exit_free_master; - } tsd->base = devm_ioremap_resource(&pdev->dev, r); if (IS_ERR(tsd->base)) { ret = PTR_ERR(tsd->base);