sd = media_entity_to_v4l2_subdev(entity);
- for (i = 0; i < RVIN_REMOTES_MAX; i++)
+ for (i = 0; i < ARRAY_SIZE(group->remotes); i++)
if (group->remotes[i].subdev == sd)
return i;
mutex_lock(&vin->group->lock);
- for (i = 0; i < RVIN_CSI_MAX; i++) {
+ for (i = 0; i < ARRAY_SIZE(vin->group->remotes); i++) {
if (vin->group->remotes[i].asc != asc)
continue;
vin->group->remotes[i].subdev = NULL;
mutex_lock(&vin->group->lock);
- for (i = 0; i < RVIN_CSI_MAX; i++) {
+ for (i = 0; i < ARRAY_SIZE(vin->group->remotes); i++) {
if (vin->group->remotes[i].asc != asc)
continue;
vin->group->remotes[i].subdev = subdev;