[PATCH 3/4] drm: bridge: simple-bridge: use only devm* in probe

Dmitry Baryshkov dmitry.baryshkov at linaro.org
Tue Jun 18 17:24:28 UTC 2024


On Tue, Jun 18, 2024 at 01:37:15PM GMT, Marc Gonzalez wrote:
> On 18/06/2024 00:28, Dmitry Baryshkov wrote:
> 
> > On Mon, Jun 17, 2024 at 06:03:01PM GMT, Marc Gonzalez wrote:
> >
> >> Once probe uses only devm functions, remove() becomes unnecessary.
> > 
> > Breves vibrantesque sententiae
> > 
> > With the hope of getting an expanded commit message:
> > 
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> 
> I'm not quite sure what else to say.
> 
> Using only devm* functions in probe, the remove() callback is
> no longer needed, since devm unwind will free all resources.
> 
> Is that better?

Yes. Or something like:

The only call in remove() is drm_bridge_remove(). Use devm_bridge_add(),
removing the need to call drm_bridge_remove() manually and drop the
driver's remove callback completely.

> 
> NB: this patch is not *required* but I thought "might as well
> change it while I'm in the code".
> 
> Regards
> 

-- 
With best wishes
Dmitry


More information about the dri-devel mailing list