Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp192309pxk; Wed, 16 Sep 2020 01:41:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/SQcEFFFkupwsBYDdFi5cxjaDwLRKcsxjljPlOy5hqlmI2s861m5VBgHIU+lUkVYHxm9j X-Received: by 2002:a17:906:158a:: with SMTP id k10mr23665009ejd.174.1600245696661; Wed, 16 Sep 2020 01:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600245696; cv=none; d=google.com; s=arc-20160816; b=JsLtYoHiED1iYpCs+h3futKG5i6vgi7jkP0JaHor9sytfKGN9m/FOXfAzpz/ev/qP+ kVN4HSSQEro7B+jGJ+iGbjEuJ0iOr9iHHlqzg9VRwm0uXHb/KKranEkkTksuOuI1XwEk JHgAnvdPdtouEAAfHbpX+1wCY2dwMJXTuR+BLaaBKnRI72K8EOONeC2N9/NeohUTSXnZ JL7WJSCCMU7W0XtwCjiASQB9zKvW9a8fDmYLV0u26kl0ZPQ+B/HI/L6YYUQKteZ2bViQ +DMQ3Fu55Vff9IjD1Kf/mZqdy+JMQzBTIL/G0+/C/MXtOuSbHW07gnsMBxkfmWdk1h3h W3lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=F6H3vb6UkKJmFpUf9sxgU5B2TZp/juwutKwOjUDSDmE=; b=XLXFK5Am/AE/ByVWJhzMYzxHugpWfY8oz8jjyN8gUa99ihRTesNP+/ThPp+ud9V1+H TesvR2sViaFCMOBu7s9cf8YUS7I0F2T2ne1nXzo503hJQKnWFVU8eZcr1jFAY3cRQe8n N2yLAktjheo1o/vp2z1nt2y/2UUhvaqchkwHGofNb7wJzi7vi/8o0cagJNhIvLCQzTea 8FZhiPYKHsiI+HtG3kOBraFQj7R6tbj1D5ITF2iIMcpsieQH/SrDgoO1rfEKLjPYHfeD 5xLH8E5r+IA5GxmGBnDsYsIRIx4HwbHrQ34ecirsMCBtn9Je4Is81Qe3uBvXudxZrAPR Fi+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="CA3Lf/ka"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si11222096edq.528.2020.09.16.01.41.13; Wed, 16 Sep 2020 01:41:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="CA3Lf/ka"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726481AbgIPIkg (ORCPT + 99 others); Wed, 16 Sep 2020 04:40:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbgIPIkf (ORCPT ); Wed, 16 Sep 2020 04:40:35 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEF37C06174A; Wed, 16 Sep 2020 01:40:33 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id c8so5436967edv.5; Wed, 16 Sep 2020 01:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=F6H3vb6UkKJmFpUf9sxgU5B2TZp/juwutKwOjUDSDmE=; b=CA3Lf/kaeVySbCp1bpQmBo+ydSP49rssWuo5adz0oB7pEIErJVq+stIL7AeJiU395O B+GmT/fX6ZcHBWFuNrO0ZYi0JJIk4D6FIghGzr6oWNJqq+MXjbI2UT8h4LfDyCCawmMd rOkm4NY1qyzB8pBOjuMHTbgaCMvFEwW1u5YyEyl7nVgwIROBDQrucqJwRPRvCk0Qjgsu ytfrTtUiCI0TxTP/7Q97WqrG0m/jwpbGuC7Ukg1dATjgdsd6/8669NKAwmO/Jm94gbb+ R9z0XyikKQYws6z069vEL8Rw6zasJPuOVTixuvPgl7lL53lKi1fxTOYNQNnTaui0kklR tM1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=F6H3vb6UkKJmFpUf9sxgU5B2TZp/juwutKwOjUDSDmE=; b=JH+/2SLgd1p1m3aVuM7xzXxBlBue4w5VzjGYmddRzKXd1AiTyW2SnMM9Jtyscp6Xi3 5bQkA9duN8ee47s7puCpxrvgEp7R7a1jYLp6sv91mQBsl9jVprjrssnlIhl1fP0mJL3o tm3y5DN6wRX2HFpgoqpIWUy1KukOtfTDfI0NHy/RNoLyoGDWKY74Ba16c3wwlaW4/82Q PdaE+savWHdORMwZKcX7yBAawzcegPWG8dMPl6LPbojrJL4lTr4eGKKFBzU4PZTCCQHo VXy5UqeB1GPpZjgH6xGJK9YKWZFEPybzyXerUrXZlvx77JMLfz21VeYt5lS0c7zXxCir cELg== X-Gm-Message-State: AOAM533N7oCGopYmnMcrvKCOMNjMvdBhHLnuma/FWu8RB9ehMRPpLEBH cZ+xyEMTdbWtVHUv9uSZLCA= X-Received: by 2002:a50:8523:: with SMTP id 32mr27570873edr.282.1600245632703; Wed, 16 Sep 2020 01:40:32 -0700 (PDT) Received: from localhost.localdomain ([2a01:598:b890:270b:75d6:3bdd:1167:483e]) by smtp.gmail.com with ESMTPSA id bm2sm13679106edb.30.2020.09.16.01.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 01:40:31 -0700 (PDT) From: Bean Huo To: alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] scsi: ufs-exynos: use devm_platform_ioremap_resource_byname() Date: Wed, 16 Sep 2020 10:40:17 +0200 Message-Id: <20200916084017.14086-1-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo Use devm_platform_ioremap_resource_byname() to simplify the code. Signed-off-by: Bean Huo --- v1-v2: change the patch commit subject --- drivers/scsi/ufs/ufs-exynos.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 8f1b6f61a776..1eecbe550536 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -940,7 +940,6 @@ static int exynos_ufs_init(struct ufs_hba *hba) struct device *dev = hba->dev; struct platform_device *pdev = to_platform_device(dev); struct exynos_ufs *ufs; - struct resource *res; int ret; ufs = devm_kzalloc(dev, sizeof(*ufs), GFP_KERNEL); @@ -948,24 +947,21 @@ static int exynos_ufs_init(struct ufs_hba *hba) return -ENOMEM; /* exynos-specific hci */ - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vs_hci"); - ufs->reg_hci = devm_ioremap_resource(dev, res); + ufs->reg_hci = devm_platform_ioremap_resource_byname(pdev, "vs_hci"); if (IS_ERR(ufs->reg_hci)) { dev_err(dev, "cannot ioremap for hci vendor register\n"); return PTR_ERR(ufs->reg_hci); } /* unipro */ - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "unipro"); - ufs->reg_unipro = devm_ioremap_resource(dev, res); + ufs->reg_unipro = devm_platform_ioremap_resource_byname(pdev, "unipro"); if (IS_ERR(ufs->reg_unipro)) { dev_err(dev, "cannot ioremap for unipro register\n"); return PTR_ERR(ufs->reg_unipro); } /* ufs protector */ - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ufsp"); - ufs->reg_ufsp = devm_ioremap_resource(dev, res); + ufs->reg_ufsp = devm_platform_ioremap_resource_byname(pdev, "ufsp"); if (IS_ERR(ufs->reg_ufsp)) { dev_err(dev, "cannot ioremap for ufs protector register\n"); return PTR_ERR(ufs->reg_ufsp); -- 2.17.1