Hi Sebastian,
Sebastian Reichel wrote:
Hi,
On Thu, Sep 15, 2016 at 02:22:18PM +0300, Sakari Ailus wrote:
Remove the loop in sub-device registration and create each sub-device
explicitly instead.
Reviewed-By: Sebastian Reichel <sre@xxxxxxxxxx>
Thanks!
+static int smiapp_register_subdevs(struct smiapp_sensor *sensor)
+{
+ int rval;
+
+ if (sensor->scaler) {
+ rval = smiapp_register_subdev(
+ sensor, sensor->binner, sensor->scaler,
+ SMIAPP_PAD_SRC, SMIAPP_PAD_SINK,
+ MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
+ if (rval < 0)
return rval;
- }
}
- return 0;
+ return smiapp_register_subdev(
+ sensor, sensor->pixel_array, sensor->binner,
+ SMIAPP_PA_PAD_SRC, SMIAPP_PAD_SINK,
+ MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
}
I haven't looked at the remaining code, but is sensor->scaler
stuff being cleaned up properly if the binner part fails?
That's a very good question. I don't think it is. But that's how the
code has always been --- there are issues left to be resolved if
registered() fails for a reason or another. For instance, removing and
reloading the omap3-isp module will cause a failure in the smiapp driver
unless it's unloaded as well.
I think I prefer to fix that in a different patch(set) as this one is
quite large already.
--
Kind regards,
Sakari Ailus
sakari.ailus@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html