FROMLIST: media: ov2740: identify module after subdev initialisation

The module identifying will try to get the sub device data which
will be ready after sub device initialisation, so if try to use the
subdev data to deference the client will cause NULL pointer
dereference, this patch move the module identification after
v4l2_i2c_subdev_init() to fix this issue, it also fixes duplicate
module idendification.

Fixes: ada2c4f54d0a ("media: ov2740: support device probe in non-zero ACPI D state")
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
(am from https://patchwork.kernel.org/patch/12712114)

BUG=b:202277522
TEST=Build and system boot up

Fixes: 344e9b7e7407 ("media: ov2740: support device probe in non-zero ACPI D state")
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Change-Id: I266de6c7a919885458394947fb4a7b172dcf88ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3382685
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Kane Chen <kane.chen@intel.corp-partner.google.com>
Commit-Queue: Rajat Jain <rajatja@google.com>
Tested-by: Jim Lai <jim.lai@intel.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Commit-Queue: Sergey Senozhatsky <senozhatsky@chromium.org>
1 file changed