From patchwork Sat Feb 1 10:08:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13956163 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6F71C0218A for ; Sat, 1 Feb 2025 10:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=QmsYcqoNFLkVa0nqtgV2ZxLMA7GDCw4DX8RX1CEFvIc=; b=FrM0uH9aWTpNO3UYUJwRHMhMKG dQ3XohaE55Bj+T90PpryHTa9RYr0THm+8RtuTrBvXTccsOt1kTRj6NbY5y1xIKwYmJO7uxoj+wsJa SqKVZZ/WMG1VmZZ5yYJTSY4YN6/R6+fA3OXgenoFq0XJZb2LSxqJ5IMVyRaajj+NugYodJFcnxSqy 39I79jLOAvsomEMxJIGVGLqw7Ep5QWPG/jrjSK+G/FYO2SQHj8SAFZGlyenI1LrmeH4h+5zsJFoCs H509lqZmTda16qopSN3LdxL/Le5rySaThR8yxXwZwylUovVVwrnshCWzPfP8c8bkpJkOI1UfM/C0C 9LoS4eZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1teAS8-0000000C7XT-003K; Sat, 01 Feb 2025 10:10:16 +0000 Received: from relmlor2.renesas.com ([210.160.252.172] helo=relmlie6.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1teAQm-0000000C7TI-0LcB for linux-arm-kernel@lists.infradead.org; Sat, 01 Feb 2025 10:08:53 +0000 X-CSE-ConnectionGUID: Dv6qrRyyRFWMdW8eeRf/XA== X-CSE-MsgGUID: 3bIcAGRBRoGnfqOFSySPlQ== Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 01 Feb 2025 19:08:48 +0900 Received: from localhost.localdomain (unknown [10.226.92.62]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 2C6AA40062C1; Sat, 1 Feb 2025 19:08:34 +0900 (JST) From: Biju Das To: Mauro Carvalho Chehab , Krzysztof Kozlowski Cc: Biju Das , Sylwester Nawrocki , Alim Akhtar , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH] media: platform: exynos4-is: Use of_get_available_child_by_name() Date: Sat, 1 Feb 2025 10:08:29 +0000 Message-ID: <20250201100833.34642-1-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250201_020852_233351_FE7C374C X-CRM114-Status: UNSURE ( 8.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Simplify fimc_md_is_isp_available() by using of_get_available_child_by_name(). Signed-off-by: Biju Das Reviewed-by: Krzysztof Kozlowski --- This patch is only compile tested and depend upon[1] [1] https://lore.kernel.org/all/20250201093126.7322-1-biju.das.jz@bp.renesas.com/ --- drivers/media/platform/samsung/exynos4-is/media-dev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/samsung/exynos4-is/media-dev.h b/drivers/media/platform/samsung/exynos4-is/media-dev.h index a50e58ab7ef7..ce89465c22de 100644 --- a/drivers/media/platform/samsung/exynos4-is/media-dev.h +++ b/drivers/media/platform/samsung/exynos4-is/media-dev.h @@ -179,8 +179,8 @@ int fimc_md_set_camclk(struct v4l2_subdev *sd, bool on); static inline bool fimc_md_is_isp_available(struct device_node *node) { struct device_node *child __free(device_node) = - of_get_child_by_name(node, FIMC_IS_OF_NODE_NAME); - return child ? of_device_is_available(child) : false; + of_get_available_child_by_name(node, FIMC_IS_OF_NODE_NAME); + return child != NULL; } #else #define fimc_md_is_isp_available(node) (false)