Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A743C433EF for ; Mon, 29 Nov 2021 17:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348919AbhK2Rsm (ORCPT ); Mon, 29 Nov 2021 12:48:42 -0500 Received: from mout.gmx.net ([212.227.17.22]:41917 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348352AbhK2Rqm (ORCPT ); Mon, 29 Nov 2021 12:46:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1638207789; bh=17zgiDXDq3UcSUuPCRNhT7DaQshJRnZDLVC0K9ZmqjE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=JSbEyBNDiQaypk8SgE1LFX4xGKBHWYJnQ0PA3xu61Nlq5R0FlP1f5ldPM1MwiSsY6 KjLL281hfRB2rlpQA85CqQp29PDZ+Gdaxd5UJJWu4dlMLxEZBt1+xzteDchGBps6JL V2lvAIv6JHNE+GKoWL5MARxDpVfIJcEL+RDGWXUs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.119.124]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MfYLQ-1mPHcb1uyu-00g2WM; Mon, 29 Nov 2021 18:43:09 +0100 From: Lino Sanfilippo To: gregkh@linuxfoundation.org Cc: linux@armlinux.org.uk, jirislaby@kernel.org, andre.przywara@arm.com, p.rosenberger@kunbus.com, lukas@wunner.de, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Lino Sanfilippo Subject: [PATCH v2] serial: amba-pl011: do not request memory region twice Date: Mon, 29 Nov 2021 18:42:38 +0100 Message-Id: <20211129174238.8333-1-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:vhsAkv3IJRjj+N3cP1XhD5UefnXX/MszVGn4CT6Tc+YNrPvE47i rDIw9kbit1MYyZLRaq73bKg9Idyz0SzHhWz3n2gqnNllgjW6gftMGRd0hsyJiBSXCG6K6UZ Tx3sPut4WiPpzL0vkYj23Ehc7mP0vzkfnpx8Stnk6gEZgi7zakYt6OScQQ/D+VvAVEXAQRs 0a2gbnK8V6fu6dH1rTWzA== X-UI-Out-Filterresults: notjunk:1;V03:K0:pDUyDeJNWfQ=:lWnr8Ii7JUW5F49dHyf1tt o5uSOV2C0g568SEMnouo8sds1GgdXzYtrRjiXUdsqNfGTfTc2nAig5xYIv8bN+oaAk+lwcHXC qBdQFJkajZJKkAyGOPHReph+JR3pmp+uuXZvkPQCx3Q0mXVfKpQDT0WGi93bDPADw+tPOOEz8 EOliiM3WfKwm6mfFobm8SKOG2c29JR5PdvLVYEnpP9kupq6FKDEs/tiyszVr6flg2ZgWxFnhV vKQGPzcGGED2DUz4qJoW+eNIPPVax8cf/eo5YM/hGmfb4yE0Rl+tnwvFU5JHZkN7rxN+irf87 0cPfcPBziDMGtlB28a+tQrAImSQUmd0P/QIzDECN26/wy0JM4hgwDKDqYZeEDbEv1Ga4lsy1/ Xj6H+ERbImTVrJDfYl9quDkygxLjvhWYP63r06ikk2zI8HPEX6Es4xHKHSnAPYC0bo9t6QC+o KdeFvs4vpcu2eHzXGszPp3Q0uoPTe7n797SqMxKoHjF0TPQCACunZ6c76MQ0yuFXc3efYbew9 3dNWgURR29ZrkUMuOYYRHQA20/vAXlJSBqFR0ETASPUMpUkDN2zig2UNe7A/ikLSvTCVduFvU x4ojzKOGbC2lPfTa4DYxCvjMNdJOukrHbv+6it5TgJRLUevy4DMtoWBkISu6fZz198SOmrmJd L5h8q39byDM8x9tsj5wuyWYn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