On 23/02/16 17:03, Jyri Sarha wrote:
> Use devm_kzalloc() and devm_kcalloc() for private data allocation at
> driver load time.
> 
> Signed-off-by: Jyri Sarha <jsarha at ti.com>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c   |  4 +---
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c    | 19 +++++++------------
>  drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 20 ++++++--------------
>  drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 24 +++++++-----------------
>  4 files changed, 21 insertions(+), 46 deletions(-)

I see you took one step further and used devm_alloc for the crtcs and
encoders etc too =). I don't see why that wouldn't work, though, as they
are all created at init time and freed when the driver exits.

However, at least omapdrm does handle freeing in the specific _destroy
callbacks, so I do wonder if there's some reason for that...

Did you test with tilcdc as module, with all the kernel debug options
enabled, and a few load/unload module cycles?

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160224/2c6f0db8/attachment.sig>

Reply via email to