Re: [PATCH v2 05/68] drm/connector: Mention the cleanup after drm_connector_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 22, 2022 at 04:31:06PM +0200, Maxime Ripard wrote:
> Unlike encoders and CRTCs, the drm_connector_init() and
> drm_connector_init_with_ddc() don't mention how the cleanup is supposed to
> be done. Let's add it.
> 
> Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
Looks sensible,
Acked-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_connector.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 353d83ae09d3..f0c4665caf38 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -222,6 +222,10 @@ void drm_connector_free_work_fn(struct work_struct *work)
>   * Initialises a preallocated connector. Connectors should be
>   * subclassed as part of driver connector objects.
>   *
> + * At driver unload time the driver's &drm_connector_funcs.destroy hook
> + * should call drm_connector_cleanup() and free the connector structure.
> + * The connector structure should not be allocated with devm_kzalloc().
> + *
>   * Returns:
>   * Zero on success, error code on failure.
>   */
> @@ -345,6 +349,10 @@ EXPORT_SYMBOL(drm_connector_init);
>   * Initialises a preallocated connector. Connectors should be
>   * subclassed as part of driver connector objects.
>   *
> + * At driver unload time the driver's &drm_connector_funcs.destroy hook
> + * should call drm_connector_cleanup() and free the connector structure.
> + * The connector structure should not be allocated with devm_kzalloc().
> + *
>   * Ensures that the ddc field of the connector is correctly set.
>   *
>   * Returns:
> -- 
> 2.36.1



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux