[PATCH v10 03/11] drm/etnaviv: Add dedicated functions to create and destroy platform device

Sui Jingfeng suijingfeng at loongson.cn
Wed Jun 21 14:03:14 UTC 2023


Hi,

On 2023/6/21 18:23, Lucas Stach wrote:
> That's right, but all you do with those indirections through the
> parameter list is move which of the functions is non-pure, in your case
> it's etnaviv_init/etnaviv_exit,

But there is a difference,  etnaviv_init() and etnaviv_exit() is 
impossible to be shared

there are only get called once when the module is loaded.

They can never be reused anymore, except here.

And etnaviv_init() and etnaviv_exit() don't have a choice.


But for etnaviv_create_platform_device() function,

there is a possibility to be reused in the future.


> with the indirection dropped it's
> etnaviv_create_platform_device/etnaviv_destroy_platform_device.

-- 
Jingfeng



More information about the dri-devel mailing list