Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3867245ybb; Mon, 23 Mar 2020 09:08:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvAgnO94yqSpoE/k4WLe3ozXCYvgeNkSA3w32TDIl34KqHDfmOm6+Uvk2En6VcSgWQMSzQJ X-Received: by 2002:a9d:1b31:: with SMTP id l46mr7696121otl.95.1584979693683; Mon, 23 Mar 2020 09:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584979693; cv=none; d=google.com; s=arc-20160816; b=Ywmr4itOANWW8sN5eccza+WwAjYxy4qhZdXAPnuLQBS6itsrBJgSkTxUAmBcJid4cW XTOEcZQ9aUAIMkPzJc2u9lSdmgi3FZiTX0rNoo7yNLLkeZr02ms2SxFkdZX1QIwUZMil 1N2FWuhzte/Xe4Gkt6jPTB5gIa7xSZXQsiIcjVdDkrBswk+d395aTAk2sWZ9c9kP7q6L sIu4nIJT83KeGv3i/z2/sU8prg7ceCH+O8OywMFpgnea2dXHr4ut9TLdJ0FbikNFF4eJ 0JJOBeACN6SxTfLG+/eDWSqcH6JfjlwFJSZQkP2Kbcl92Tq/QMqWYC3vwc2aADbKBgP+ yV8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8tYqGa6805J8Z9/SpCi+A0e31BtAsAhuAIgSlltUwew=; b=zTDPThd/ZtYTNIV7SjSCdyNSKczO2niJZcq7Qzt5VbTN33Bs1YispBW5N4uLzlRoGE JL4ti/oG4bFhB8gFC+o5EJfIo8RFtkD0E5Efpf6aYoJEv/Ei2gkbJXZql9q8GLBP7ttY fWAVk4BfLMYAsI2itZk6r1cu5DjZChOa8H+kj2Hs6ZJ7ad2c4A+li0Nrl58SRbhm7r5b 1Hf6Bg+KEu4pl4WOPkVaSEl12oHYs7ywGiXHCLkxq0boUf2U9/JTR9iwL7/77P4Q2Uvt NTefmZtR/KV+S+DQPVoE/M8s7Appcq82WlRUUWRV6y4fX6x0v6K5ICfa6wczkCmpGciy ALxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cxD82NUs; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si2450628otq.21.2020.03.23.09.08.00; Mon, 23 Mar 2020 09:08:13 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=cxD82NUs; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727546AbgCWQGm (ORCPT + 99 others); Mon, 23 Mar 2020 12:06:42 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42518 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727408AbgCWQGl (ORCPT ); Mon, 23 Mar 2020 12:06:41 -0400 Received: by mail-pf1-f193.google.com with SMTP id 22so4094784pfa.9; Mon, 23 Mar 2020 09:06:41 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=8tYqGa6805J8Z9/SpCi+A0e31BtAsAhuAIgSlltUwew=; b=cxD82NUsmUlVkHHLZICBsIGlSbSsRH+t+nItS6ajOAR293BWCmcMWyvEkA4ahQFws0 H5tyMnz6yqu/P6Iq32+r7XW/DCzXtheZ2+2j9RG6Pbkp6VzYJ/dfc/E0EuxjwRZHFLEn i9cT+EWJCKhMtZ7t2VcWSRPDoy8eyzY9B8kLvFed9Ufxp2P8ALLLS7xYGS7HjavTrz0s iz0K1pCIJs4QcAuoepsuTYEoTDVy2+Vl+GwGFQOIWVGexdqqvTQXXnI7rviZzxyMdQVT 60qmlswkuOsJWy7kwQpLpipUY5i6IX6kXrfbWI0Vz0BHv9JFEIigNzdSQjUa0EVbZdh4 ncIA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8tYqGa6805J8Z9/SpCi+A0e31BtAsAhuAIgSlltUwew=; b=Dv9XHS3TZl95dbot3xj9xfmTNJUBF6aGLSd2/wMOCHh56o/kqyOqRYZ/4WtfwyONdZ K5XkYoCDydWhy/FSicWVzGNFAxcky1cN/qgxTEnIuqBQe+ajJBQxPbE6xG4oqyVEF6/F 7adbrIvUQ8+FiHbtU9+Z8SADoItB9fUZdEVtiry9ANEHvEZxHP1BNr/5923MmZInXqLh L1Eoe8yX6Y+i/M9DsSpIUUl3VAtNj2ySmUy9AoC66uuoWlP1bMojLjGIh5YM4WOI/8Ej AiRe80I0rLDYIM7SkREQikdasbzRzMj9yWB5SzxvHCJUHNDAUqyoLqlRIfpMzB3UlH7J bG7A== X-Gm-Message-State: ANhLgQ1+Ts2fRZH39R6q9UXu2aiA62uqj1lV1ciisJ9zkW9RiZvf+/Sa hjVDhNW84o8+yK3USTndNAE= X-Received: by 2002:aa7:99d1:: with SMTP id v17mr26147892pfi.165.1584979600922; Mon, 23 Mar 2020 09:06:40 -0700 (PDT) Received: from localhost (176.122.158.203.16clouds.com. [176.122.158.203]) by smtp.gmail.com with ESMTPSA id q103sm294485pjc.1.2020.03.23.09.06.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Mar 2020 09:06:40 -0700 (PDT) From: Dejin Zheng To: gregkh@linuxfoundation.org, rafael@kernel.org, hminas@synopsys.com, mathias.nyman@intel.com, bgolaszewski@baylibre.com, arnd@arndb.de, geert+renesas@glider.be, tomas.winkler@intel.com, tglx@linutronix.de, hdegoede@redhat.com, treding@nvidia.com, suzuki.poulose@arm.com Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Dejin Zheng , Mathias Nyman Subject: [PATCH v4 3/5] usb: host: hisilicon: convert to devm_platform_get_and_ioremap_resource Date: Tue, 24 Mar 2020 00:06:10 +0800 Message-Id: <20200323160612.17277-4-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200323160612.17277-1-zhengdejin5@gmail.com> References: <20200323160612.17277-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_get_and_ioremap_resource() to simplify code, which contains platform_get_resource() and devm_ioremap_resource(), it also get the resource for use by the following code. Reviewed-by: Geert Uytterhoeven Acked-by: Mathias Nyman Signed-off-by: Dejin Zheng --- v3 -> v4: - no changed. v2 -> v3: - call the rename function devm_platform_get_and_ioremap_resource() v1 -> v2: - add this patch for add some real users of this function. drivers/usb/host/xhci-histb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-histb.c b/drivers/usb/host/xhci-histb.c index 3c4abb5a1c3f..5546e7e013a8 100644 --- a/drivers/usb/host/xhci-histb.c +++ b/drivers/usb/host/xhci-histb.c @@ -219,8 +219,7 @@ static int xhci_histb_probe(struct platform_device *pdev) if (irq < 0) return irq; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - histb->ctrl = devm_ioremap_resource(&pdev->dev, res); + histb->ctrl = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(histb->ctrl)) return PTR_ERR(histb->ctrl); -- 2.25.0