Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4928757pxb; Wed, 19 Jan 2022 07:42:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyihnCVRG/j40HLsSEVP2ngCoawZ4odYRqkShBrClBg8cBAbzqtcc7LtuEADCgsxemvXu0K X-Received: by 2002:a17:902:e541:b0:14a:5a5c:10d9 with SMTP id n1-20020a170902e54100b0014a5a5c10d9mr32560810plf.56.1642606970081; Wed, 19 Jan 2022 07:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642606970; cv=none; d=google.com; s=arc-20160816; b=ChopKtr5vRthdp+tkHU4ap0IjOCARUVHpvXGGzZYoZkF9cNg4c0p4T/7uMy5hJXiAc mcEmjtZKuNNrQgBiDkPwOQyWc1GU+iPNsXFjsdEdaLPcUDTOrIcGmWiEjc+fZw/7BrIQ Jcg7EGjo0rAcs7nRPj5FOaziXMDixqWX3wQ9KD6VvEcvyFDwEdaH5VCpNPpAlE1qfro3 po8A9kfRrKsz020N9cyqW9jOlf8++YraSH9bF+F5Q5Hs8/wu33J6N0mnvH+GyufyqOho 5o7QFxk/84y2vVU9bY31n2lm33o2QXXUJQeHZvbioDZ7PLkYRi+og1GKQ2le6BUwDPJm Tpbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gPjp2TnFR7BloIyPFn/+HwD4xxjuu/r1gCld/BexMLc=; b=cwyPuYOqKFV8PnjxJWVjZ7HSVj61G7/T4rQeFPoWxLfQyyIR8P7rtKgT3/NxQKQvRe ZEedd6Sw7lj8LfNw4ljaLvkkFUNuTZ4GOpL3rj/0uTdDYgezTN5HwPYRuDuGLmTCgv9S ddN2nvL2lOyGQoAwbLlk+hpwvjg+9zFW1e4dmQ4/CgOfB73lFfKJrUim+SGQpiD1PCal 4Pqd7Br51aRW+bUHuP2jUQuOrWcqLS4sU2Jiw+kyUf8469FhmaTM5iiWkSH3XNfWFweH L1VWvQbJZjXyarmTSfm3slQWRWXuKcZXEl5+uoivGboApww77aRuRjYMg7M3tbRn7f7a OHlw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si21761786plh.463.2022.01.19.07.42.37; Wed, 19 Jan 2022 07:42:50 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349798AbiARD0p (ORCPT + 99 others); Mon, 17 Jan 2022 22:26:45 -0500 Received: from mail-sh.amlogic.com ([58.32.228.43]:18672 "EHLO mail-sh.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355094AbiARDLA (ORCPT ); Mon, 17 Jan 2022 22:11:00 -0500 Received: from droid06.amlogic.com (10.18.11.248) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2176.14; Tue, 18 Jan 2022 11:09:55 +0800 From: Yu Tu To: , , , CC: Greg Kroah-Hartman , Jiri Slaby , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Yu Tu Subject: [PATCH V6 2/5] tty: serial: meson: Use devm_ioremap_resource to get register mapped memory Date: Tue, 18 Jan 2022 11:09:08 +0800 Message-ID: <20220118030911.12815-3-yu.tu@amlogic.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220118030911.12815-1-yu.tu@amlogic.com> References: <20220118030911.12815-1-yu.tu@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.18.11.248] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace devm_request_mem_region and devm_ioremap with devm_ioremap_resource to make the code cleaner. Signed-off-by: Yu Tu --- drivers/tty/serial/meson_uart.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 6b80e41b4cc1..7570958d010c 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -720,15 +720,7 @@ static int meson_uart_probe(struct platform_device *pdev) if (!port) return -ENOMEM; - if (!devm_request_mem_region(&pdev->dev, res_mem->start, - resource_size(res_mem), - dev_name(&pdev->dev))) { - dev_err(&pdev->dev, "Memory region busy\n"); - return -EBUSY; - } - - port->membase = devm_ioremap(&pdev->dev, res_mem->start, - resource_size(res_mem)); + port->membase = devm_ioremap_resource(&pdev->dev, res_mem); if (IS_ERR(port->membase)) return PTR_ERR(port->membase); -- 2.33.1