lkml.org 
[lkml]   [2020]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v6 6/9] media: tegra: Add Tegra210 Video input driver
From
Date
04.04.2020 04:25, Sowjanya Komatineni пишет:
...
> +static int tegra_vi_tpg_channels_alloc(struct tegra_vi *vi)
> +{
> + struct tegra_vi_channel *chan, *tmp;
> + unsigned int port_num;
> + unsigned int nchannels = vi->soc->vi_max_channels;
> + int ret = 0;
> +
> + for (port_num = 0; port_num < nchannels; port_num++) {
> + /*
> + * Do not use devm_kzalloc as memory is freed immediately
> + * when device instance is unbound but application might still
> + * be holding the device node open. Channel memory allocated
> + * with kzalloc is freed during video device release callback.
> + */
> + chan = kzalloc(sizeof(*chan), GFP_KERNEL);

Why anyone would want to unbind this driver in practice?

I think it should make more sense to set suppress_bind_attrs=true.

\
 
 \ /
  Last update: 2020-04-05 23:11    [W:0.283 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site