summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorSteve Longerbeam <slongerbeam@gmail.com>2019-08-24 13:33:37 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-10-10 07:28:25 -0300
commit2a4558c6adc455bdee6fe85db43cbc83338c0230 (patch)
tree074eb43c12d2c7b932752c7d9d1a2afe4bd63ce5 /drivers/media/platform
parent1f4642464655e16b70c4998a92cddc94555e2a5a (diff)
media: imx: Move pads init to probe
If a subdevice is unregistered and then registered again without the driver being removed and re-probed (which will happen when the media device is removed and re-probed without also removing/re-probing the subdevice), media_device_register_entity() is called with a non-zero entity->num_pads, and then the subdevice's .registered callback calls media_entity_pads_init(). Thus the subdevice's pad objects are added to the media device pad list twice, causing list corruption. One way to fix this would be to create media_entity_pads_destroy(), and call it in the subdevice's .unregistered callback. But calling media_entity_pads_init() in the .registered callbacks was done for legacy reasons and is no longer necessary, so move the call to media_entity_pads_init() into the subdevice's probe functions. This fixes the duplicate pad obejcts in the media device pad list. Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform')
0 files changed, 0 insertions, 0 deletions