MLK-25258: media: imx: unregister v4l2 async notifier when no sensor connected
authorGuoniu.zhou <guoniu.zhou@nxp.com>
Sat, 20 Feb 2021 08:00:54 +0000 (16:00 +0800)
committerGuoniu.zhou <guoniu.zhou@nxp.com>
Fri, 9 Apr 2021 10:08:59 +0000 (18:08 +0800)
commitfab9c390ae4142c76148e01a3f10f42fd3ae0dd2
tree7eb7f9c56c68cda505b4edde9de508ef397bcba4
parent0e1514d8282718e9374f61a734fc16afa2430a02
MLK-25258: media: imx: unregister v4l2 async notifier when no sensor connected

In order to support hotplug-like mechanism, driver will call subdev notifier
complete function manually if there is sensor connected. If there there is no
valid sensor conneted when imx8-media-dev driver loaded, it will unregister
video device subdev. But in some case, sensor driver will be loaded after it.
In order to cover the case, imx8-media-dev driver unregister v4l2 async notifier
if there is no sensor connected. After sensor driver load, user can unload imx8-
media-dev driver and load it again.

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
drivers/staging/media/imx/imx8-media-dev.c