media: atomisp: Fix up the open v load race
authorAlan <alan@linux.intel.com>
Mon, 6 Nov 2017 23:36:36 +0000 (23:36 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:40 +0000 (08:11 +0000)
commit59a27d5c98f7f6702c4d9d176eb6019a4d28fdac
tree97fa5fe581b23e24e6807bbb6f3b8fb110d2f0d7
parent634557be5aead60c87af3eb0a922e22d10bb44fb
media: atomisp: Fix up the open v load race

Date: Mon, 06 Nov 2017 23:36:36 +0000

This isn't the ideal final solution but it stops the main problem for now
where an open (often from udev) races the device initialization and we try
and load the firmware twice at the same time. This needless to say doesn't
usually end well.

[kitakar: ported to upstream Kernel]
[mchehab: make comments to use our coding style]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_fops.c
drivers/staging/media/atomisp/pci/atomisp_internal.h
drivers/staging/media/atomisp/pci/atomisp_v4l2.c