From patchwork Tue Nov 7 08:09:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 118118 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3685692qgn; Tue, 7 Nov 2017 00:10:58 -0800 (PST) X-Google-Smtp-Source: ABhQp+TIpDobsne/QfU4WMjBMOJeusOod3W5u52jkwj/KrJ9lytjY5lte8+nSE5y/LS/c9CkClcP X-Received: by 10.84.140.129 with SMTP id 1mr17279431plt.281.1510042258722; Tue, 07 Nov 2017 00:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510042258; cv=none; d=google.com; s=arc-20160816; b=mjf3A1HGnwmCcAqyUK6Zyre+7KpFWxXKo8SLTDaVOIK/y9cs1AB/8BzbLmqX0R5XnY 8SyGUwtAm97RHoUfvx9IE01hg7UC9m9okVD3O86rYcFus7XwzAUSHKtp08SLPvCpvNWQ pLWjIKZoET4jLXVaOHO0lzYE+Ci2dz6a3Hkd/y5y5V5wl/49HKMaisMOebG2ggy+YsUV OJsS/bQNoom8QC/85o1I+xcoh9JyQF+TZMMnXA4KJqMbIqUjK4WMtMGxc39Q3LaHK0/F wRrW9nrwTCE+9zti4UZ/6WT9TPosIj9L7XFxhzzjeUUWzwQTzqnyBQxAPsg6pgj74OGn g1nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=UtGwWV9JnIFPiWjrQK60PuerJA+wMQcv8skk+f0OMac=; b=zKl9Ogn8YwbPNsG+LBEGpAEeuC6P2Mo6a6eBKTaTRALjU/NxE6RS70YTkJme0y9vSi no6eP5o4bq/U4xS5H5MyFnuo88h80UUHpaW+TLN7qwkL37OKTnVZDrlHHZMCFBY1IEnn bHb0iEq5RTd92KIi7IUTdNZbRWt5/C3YJIXGNGQcOou1pN9hpt2OMSu3xEZ+k6WycucX MORoJw0Hi2wwp9zbjvmsoXqtz8NASS+k8enXeKLVvFWQsR/zwE77YypAQbqgZhSFx06i V73L/tN5RYbKMDbwnpuLrZtJLvqFBdniaCvb+WHKF2N/uQnPtFKJy5lV6wXHp1Fky5Ob BR3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=lWVuYmdd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si588454pgc.320.2017.11.07.00.10.58; Tue, 07 Nov 2017 00:10:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=lWVuYmdd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932621AbdKGIK5 (ORCPT + 26 others); Tue, 7 Nov 2017 03:10:57 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:24880 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932504AbdKGIKx (ORCPT ); Tue, 7 Nov 2017 03:10:53 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id vA789u4L027191; Tue, 7 Nov 2017 17:09:59 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com vA789u4L027191 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1510042199; bh=UtGwWV9JnIFPiWjrQK60PuerJA+wMQcv8skk+f0OMac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lWVuYmddaygY8e0qDRXIPVdVfv+F6xRGklc7eMiuMbtVYUDfcg95GfH1EJ//1L0dj nwhQ8zpQB2iJQXiqgliesYO9Bv73YDlKVQlv7knuzn3BnvHKZI6SqENVPrUH+vhEXD UycAkTyHmgvWW/0Yjhel1Y66R3gEnhA0zTFu5BzlB7uL4+MFfZKP2CdvyMt5/WSsQa 6yuxZavpgguLC0MErFNGpNkXi1P9OBQzRQHgngRgmK9A0RtgrZtfnixZqwMXxUy54e 6RRJt51W6jPRXZRcyI/AJi6bmzYtFf8WMb+fqKrhm2vVf4FgpmbXu43Fj3b+0B7NvG LWxjFVP2fFG5Q== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Wolfram Sang , linux-mmc@vger.kernel.org Cc: Simon Horman , Yoshihiro Shimoda , Masahiro Yamada , linux-kernel@vger.kernel.org, Ulf Hansson Subject: [PATCH 3/6] mmc: tmio: use devm_ioremap_resource() instead of devm_ioremap() Date: Tue, 7 Nov 2017 17:09:29 +0900 Message-Id: <1510042172-27220-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510042172-27220-1-git-send-email-yamada.masahiro@socionext.com> References: <1510042172-27220-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The TMIO core misses to request_mem_region(). devm_ioremap_resource() takes care of it and makes the code cleaner. Signed-off-by: Masahiro Yamada --- drivers/mmc/host/tmio_mmc_core.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) -- 2.7.4 diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 9b8ef73..0db6cac 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1182,8 +1182,9 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, _host->write16_hook = NULL; res_ctl = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res_ctl) - return -EINVAL; + _host->ctl = devm_ioremap_resource(&pdev->dev, res_ctl); + if (IS_ERR(_host->ctl)) + return PTR_ERR(_host->ctl); ret = mmc_of_parse(mmc); if (ret < 0) @@ -1199,11 +1200,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, if (ret < 0) return ret; - _host->ctl = devm_ioremap(&pdev->dev, - res_ctl->start, resource_size(res_ctl)); - if (!_host->ctl) - return -ENOMEM; - tmio_mmc_ops.card_busy = _host->card_busy; tmio_mmc_ops.start_signal_voltage_switch = _host->start_signal_voltage_switch;