]> git.baikalelectronics.ru Git - kernel.git/commit
media: rcar-vin: unregister video device on driver removal
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sat, 14 Apr 2018 11:56:58 +0000 (07:56 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 20 Apr 2018 13:32:43 +0000 (09:32 -0400)
commitdd11e6130110a886d7c9a676f3009c2150a88b3e
tree36eb7a722bd456883550bfb06c9516e6f7dbb874
parent213e0232f121f06266a2ca6a30793dde8a886b12
media: rcar-vin: unregister video device on driver removal

If the video device was registered by the complete() callback it should
be unregistered when a device is unbound from the driver. Protect from
printing an uninitialized video device node name by adding a check in
rvin_v4l2_unregister() to identify that the video device is registered.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar-vin/rcar-core.c
drivers/media/platform/rcar-vin/rcar-v4l2.c