From patchwork Sat Oct 8 11:56:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 613428 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 C9216C43217 for ; Sat, 8 Oct 2022 11:40:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbiJHLkB (ORCPT ); Sat, 8 Oct 2022 07:40:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbiJHLj6 (ORCPT ); Sat, 8 Oct 2022 07:39:58 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7618EE09 for ; Sat, 8 Oct 2022 04:39:52 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ml35348DLzlXbq; Sat, 8 Oct 2022 19:35:19 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 8 Oct 2022 19:39:49 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 8 Oct 2022 19:39:48 +0800 From: Yang Yingliang To: CC: , , Subject: [PATCH -next v2 0/2] of: introduce of_address_count() helper Date: Sat, 8 Oct 2022 19:56:15 +0800 Message-ID: <20221008115617.3583890-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Introduce of_address_count() helper to count the IO resources, so some drivers can use it instead of open-coding. E.g. irq-orion and tegra194-cbb. v1 -> v2: patch #1, make of_address_count() inline in of_address.h Yang Yingliang (2): of/address: introduce of_address_count() helper of/platform: use of_address_count() helper drivers/of/platform.c | 5 ++--- include/linux/of_address.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-)