On Wed, Oct 14, 2015 at 12:56:54PM +0200, Javier Martinez Canillas wrote:
Hello,
On 10/14/2015 12:09 PM, Sakari Ailus wrote:
On Mon, Oct 12, 2015 at 08:52:43PM -0300, Mauro Carvalho Chehab wrote:
Sakari Ailus sakari.ailus@iki.fi escreveu:
[snip]
static int isp_subdev_notifier_complete(struct v4l2_async_notifier *async) { struct isp_device *isp = container_of(async, struct isp_device, notifier);
- struct v4l2_device *v4l2_dev = &isp->v4l2_dev;
- struct v4l2_subdev *sd;
- struct isp_bus_cfg *bus;
- int ret;
- list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
list_for_each_entry(sd, &isp->v4l2_dev.subdevs, list) {
And you can drop local v4l2_dev.
This is Javier's patch, but I agree that this can be simplified.
Yes, the local variable is not needed but usually I prefer to use a variable when two levels of indirection are needed since I think that makes the code easier to read.
I don't have a strong opinion though so I don't mind if is dropped.
Later on we have:
return v4l2_device_register_subdev_nodes(&isp->v4l2_dev);
At least consistency should be maintained, whichever choice we make here. :-)
Feel free to resubmit, but I can do that as well.