Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1706729lqb; Sun, 26 May 2024 13:23:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyhFU7fnHNpPz4pjYLXF0TVIgrPqQXIFgfxNcpjju5IlRJM+rHcczl9APz1WcqHVa3eg8aOMwJBkOVh8S3bvWRoGG9ZuuOG16FjTnD9g== X-Google-Smtp-Source: AGHT+IG6C9wP1c6WlO9yeA1DKkIFuKC1yMjeEUxDjyUoKIbKd6ktoIWJzjt9P8RwS8D7NIMAd4/N X-Received: by 2002:a05:6e02:2181:b0:36a:fe09:4ddb with SMTP id e9e14a558f8ab-3737b26a4e2mr95580745ab.2.1716755029321; Sun, 26 May 2024 13:23:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716755029; cv=pass; d=google.com; s=arc-20160816; b=cq2IfiATAEym5BL6mpMLX0VAjQMf6QJMitNlWQZytvs/R7DBdbDhUq38ICS1sen08R PIfZwI/2hX4HWxzRZIrEryMs/s+TCcBp87M9QNpmNiAigvG7tOsMVWUUIEHx1EhAszqO 77heIzzy35QJId1IUfVX30sgPME4VXdsJdMLG1gcKxwbAWGvtMzmsx6ov3UFiMXJR4Ni YusH2AXs+ejqHEEBovNF4P2VqTHDZH6A8lK9UscsCeV4jzIS4xsbPlabla9qz2g3oNrT rIz97OTCk+wsVf79CnIOQbMj9PkNU1ltFhrBfKUPfWuoq+1zWjl4TkjHhQ/VSlpOTts0 hOvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HQejp35xdHl089YksIdueCjCLA/1BLC6JglYUKdLrzM=; fh=+9pjvWy/sQxAY6MxG8mZV2fAo+vnxCF8rB7oqMHgJRU=; b=RE5tLBQwPBjPBYUXycyPWTFSAldWJNfov5YhgcNPzIhC72Hmc9X0hnMl7XdvzDCbSo WH8FRiAdFtFQO/B5tfng2h/+skjKg1IOEuGvANi5ZRxhM3jo9M5GGLL+FST0pXUp5f2m 3VtOQRxqFo2Uj4X54KblwfMyGppPXWolA9IzoVakJs6ZzeQzOZzswWHP7Cg+SigL6W3E br+OPKBxRmJ/tMc4ry3l7ALzKEpBKQRn7siy2tFkxuyW7W11VTzLNF2E7Lq0M3DORpGg yaZ1H6OOmgQggCHUrBgrRvrZWggAlVMAlvXU0WYSzqeJrcuOHz1NAWPS2Wk+KHpdWv/n MXWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=PhiVssvG; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-189864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-68221c6a725si5037599a12.121.2024.05.26.13.23.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 13:23:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=PhiVssvG; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-189864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 97E022811F2 for ; Sun, 26 May 2024 20:23:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5400313AD06; Sun, 26 May 2024 20:22:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="PhiVssvG" Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 141D2139CFA for ; Sun, 26 May 2024 20:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716754935; cv=none; b=gEOka46Ssf3TVWR7wIPX1cElia6gWloIVU0E/V5PYzta5QrBuOeXZV1mSi5J8oUzRig/CFjFYYDKTHLxiHguTZwEYS0vXGymQEzQM3ZW5q7+owk7XbIi6+ely06AHF8al0G/GBli5EsebVvYBlqNm0QwiQCqCjVsi6J31cE9elI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716754935; c=relaxed/simple; bh=6BzoTFV37Xlh0oGBJjU6vH9DkyXyO9By/npTth72kd4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=llHJZgkTP/MDQB4hQWT8ohi1TkTmW/LbbxnldeL771jj/9dzh08R4E7XTOcs9FbKpnIo1f9nYhNXcWw1Uf/l7HBpWYSNsK1iK7r2zULlJC5XLHipYjdQ2aAV3wtJdbZ7TvZBWgNHo61V+lBtAPmrY7hR76V10DgUOkrf+iWX0HY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=PhiVssvG; arc=none smtp.client-ip=95.215.58.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: rfoss@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1716754932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HQejp35xdHl089YksIdueCjCLA/1BLC6JglYUKdLrzM=; b=PhiVssvGa0otgkxBvZ6vngXfyNqXoYz2Td1XFsCxUXvwz5Y4MevBR8yY1/HMUCcdTJRlcu zZXSkQan1Nyxd9NG89c86Y6VCJ+4Ok/+J8JhggcZ0Zbi3n0ejfPIpJCu2nRHTmEdOfU9+M 9oP9XD5m5a2RxER8e0NFI2n37N7g4lE= X-Envelope-To: laurent.pinchart@ideasonboard.com X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: sui.jingfeng@linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng To: Robert Foss , Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sui Jingfeng Subject: [PATCH v6 09/10] drm/bridge: sii9234: Use fwnode APIs to abstract DT dependent API away Date: Mon, 27 May 2024 04:21:14 +0800 Message-Id: <20240526202115.129049-10-sui.jingfeng@linux.dev> In-Reply-To: <20240526202115.129049-1-sui.jingfeng@linux.dev> References: <20240526202115.129049-1-sui.jingfeng@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Switch to use the freshly created drm_bridge_set_node() helper, no functional changes. The reason behind of this introduction is that the name 'of_node' itself has a smell of DT dependent, and it is a internal memeber, when there has helper function, we should use the revelant helper and avoid directly referencing and/or dereferencing it. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/sii9234.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/sii9234.c b/drivers/gpu/drm/bridge/sii9234.c index 7d2bbc31bac9..d930c093abb3 100644 --- a/drivers/gpu/drm/bridge/sii9234.c +++ b/drivers/gpu/drm/bridge/sii9234.c @@ -817,10 +817,11 @@ static int sii9234_init_resources(struct sii9234 *ctx, struct i2c_client *client) { struct i2c_adapter *adapter = client->adapter; + struct fwnode_handle *fwnode = dev_fwnode(ctx->dev); int ret; - if (!ctx->dev->of_node) { - dev_err(ctx->dev, "not DT device\n"); + if (!fwnode) { + dev_err(ctx->dev, "firmware data is missing\n"); return -ENODEV; } -- 2.34.1