drm/etnaviv: Add helper functions to create and destroy platform device
authorSui Jingfeng <suijingfeng@loongson.cn>
Mon, 2 Oct 2023 11:12:05 +0000 (19:12 +0800)
committerLucas Stach <l.stach@pengutronix.de>
Wed, 11 Oct 2023 16:50:07 +0000 (18:50 +0200)
commita10a43eee8589221d79b9050556aed2c5842d8b8
tree3dc4264dccaa2f1e4cb5f559289322764eab8c82
parent4cb91cc2cd0d31ffc690b23c88901f4f315b9d78
drm/etnaviv: Add helper functions to create and destroy platform device

The newly introduced functions are etnaviv_create_platform_device() and
etnaviv_destroy_platform_device(). Those two function are pure function
and can be shared for other use case. Currently, the benefit is that we
no longer need to call of_node_put() for three different cases, we only
need to call it once in the etnaviv_init() function.

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