Skip to content

Commit af46379

Browse files
committed
staging: vc04_services: isp: Remove duplicated initialisation
With the codec code from which this was derived, the driver had to get the supported formats for both input and output ports. This had been copied across, however here we have independent nodes for each port, but the code had been left in to do the same thing twice. Remove the duplicate. Signed-off-by: Dave Stevenson <[email protected]>
1 parent f72d18f commit af46379

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,41 +1160,6 @@ static int bcm2835_isp_get_supported_fmts(struct bcm2835_isp_node *node)
11601160
}
11611161
node->supported_fmts.num_entries = j;
11621162

1163-
param_size = sizeof(fourccs);
1164-
ret = vchiq_mmal_port_parameter_get(dev->mmal_instance,
1165-
get_port_data(node),
1166-
MMAL_PARAMETER_SUPPORTED_ENCODINGS,
1167-
&fourccs, &param_size);
1168-
1169-
if (ret) {
1170-
if (ret == MMAL_MSG_STATUS_ENOSPC) {
1171-
v4l2_err(&dev->v4l2_dev,
1172-
"%s: port has more encoding than we provided space for. Some are dropped.\n",
1173-
__func__);
1174-
num_encodings = MAX_SUPPORTED_ENCODINGS;
1175-
} else {
1176-
return -EINVAL;
1177-
}
1178-
} else {
1179-
num_encodings = param_size / sizeof(u32);
1180-
}
1181-
/* Assume at this stage that all encodings will be supported in V4L2. */
1182-
list = devm_kzalloc(dev->dev,
1183-
sizeof(struct bcm2835_isp_fmt) * num_encodings,
1184-
GFP_KERNEL);
1185-
if (!list)
1186-
return -ENOMEM;
1187-
node->supported_fmts.list = list;
1188-
1189-
for (i = 0, j = 0; i < num_encodings; i++) {
1190-
const struct bcm2835_isp_fmt *fmt = get_fmt(fourccs[i]);
1191-
1192-
if (fmt) {
1193-
list[j] = *fmt;
1194-
j++;
1195-
}
1196-
}
1197-
node->supported_fmts.num_entries = j;
11981163
return 0;
11991164
}
12001165

0 commit comments

Comments
 (0)