Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] media: i2c: mt9p031: add support for asynchronous probing

Both synchronous and asynchronous mt9p031 subdevice probing
is supported by this patch.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Lad, Prabhakar and committed by
Mauro Carvalho Chehab
9012d088 15af4a53

+6 -1
+6 -1
drivers/media/i2c/mt9p031.c
··· 28 28 #include <linux/videodev2.h> 29 29 30 30 #include <media/mt9p031.h> 31 + #include <media/v4l2-async.h> 31 32 #include <media/v4l2-ctrls.h> 32 33 #include <media/v4l2-device.h> 33 34 #include <media/v4l2-subdev.h> ··· 1146 1145 } 1147 1146 1148 1147 ret = mt9p031_clk_setup(mt9p031); 1148 + if (ret) 1149 + goto done; 1150 + 1151 + ret = v4l2_async_register_subdev(&mt9p031->subdev); 1149 1152 1150 1153 done: 1151 1154 if (ret < 0) { ··· 1167 1162 struct mt9p031 *mt9p031 = to_mt9p031(subdev); 1168 1163 1169 1164 v4l2_ctrl_handler_free(&mt9p031->ctrls); 1170 - v4l2_device_unregister_subdev(subdev); 1165 + v4l2_async_unregister_subdev(subdev); 1171 1166 media_entity_cleanup(&subdev->entity); 1172 1167 mutex_destroy(&mt9p031->power_lock); 1173 1168