]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: i2c: imx290: Check for availability in probe()
authorBenjamin Bara <benjamin.bara@skidata.com>
Tue, 3 Sep 2024 14:54:34 +0000 (16:54 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 16 Oct 2024 07:32:36 +0000 (09:32 +0200)
commit9755343cb27ef0b0a82e196e2e4d2d3c3a275163
tree32d47a8cb7d82eeb08c83a2a2f27f41bdebaa2cf
parenta92651b8e288db2fff461c544ce9b95f6fb40ce8
media: i2c: imx290: Check for availability in probe()

Currently, the V4L2 subdevice is also created when the device is not
available/connected. From userspace perspective, there is no visible
difference between a working and not-working subdevice (except when
trying it out).

This commit adds a simple preparation step, which includes an
availability check, before the subdev is initialized.

Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/imx290.c