drm/etnaviv: Add a helper to get the first available GPU device node
authorSui Jingfeng <suijingfeng@loongson.cn>
Mon, 2 Oct 2023 11:12:06 +0000 (19:12 +0800)
committerLucas Stach <l.stach@pengutronix.de>
Tue, 23 Jan 2024 09:20:20 +0000 (10:20 +0100)
commitf5cc0cbc2796627d8b9c561a8e135fe34615b654
tree081b205add28cac41b9c55187bbcc9674c75b500
parenta10a43eee8589221d79b9050556aed2c5842d8b8
drm/etnaviv: Add a helper to get the first available GPU device node

This patch make the code in the etnaviv_pdev_probe() less twisted, and it
also make it easier to drop the reference to device node after finished.
Before apply this patch, there is no call to of_node_put() when done. We
should call of_node_put() when done.

Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_drv.c