d2b0bf1f2f45bbbf856922f9dddf45623d66a354
[openwrt/staging/robimarko.git] /
1 From 6a9cc90467f4b14d596a819c87d48764a4ba5282 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 1 May 2020 17:49:08 +0100
4 Subject: [PATCH] staging: vc04_services: isp: Remove duplicated
5 initialisation
6
7 With the codec code from which this was derived, the driver had to
8 get the supported formats for both input and output ports.
9 This had been copied across, however here we have independent nodes
10 for each port, but the code had been left in to do the same thing
11 twice.
12 Remove the duplicate.
13
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 ---
16 .../bcm2835-isp/bcm2835-v4l2-isp.c | 35 -------------------
17 1 file changed, 35 deletions(-)
18
19 --- a/drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c
20 +++ b/drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c
21 @@ -1160,41 +1160,6 @@ static int bcm2835_isp_get_supported_fmt
22 }
23 node->supported_fmts.num_entries = j;
24
25 - param_size = sizeof(fourccs);
26 - ret = vchiq_mmal_port_parameter_get(dev->mmal_instance,
27 - get_port_data(node),
28 - MMAL_PARAMETER_SUPPORTED_ENCODINGS,
29 - &fourccs, &param_size);
30 -
31 - if (ret) {
32 - if (ret == MMAL_MSG_STATUS_ENOSPC) {
33 - v4l2_err(&dev->v4l2_dev,
34 - "%s: port has more encoding than we provided space for. Some are dropped.\n",
35 - __func__);
36 - num_encodings = MAX_SUPPORTED_ENCODINGS;
37 - } else {
38 - return -EINVAL;
39 - }
40 - } else {
41 - num_encodings = param_size / sizeof(u32);
42 - }
43 - /* Assume at this stage that all encodings will be supported in V4L2. */
44 - list = devm_kzalloc(dev->dev,
45 - sizeof(struct bcm2835_isp_fmt) * num_encodings,
46 - GFP_KERNEL);
47 - if (!list)
48 - return -ENOMEM;
49 - node->supported_fmts.list = list;
50 -
51 - for (i = 0, j = 0; i < num_encodings; i++) {
52 - const struct bcm2835_isp_fmt *fmt = get_fmt(fourccs[i]);
53 -
54 - if (fmt) {
55 - list[j] = *fmt;
56 - j++;
57 - }
58 - }
59 - node->supported_fmts.num_entries = j;
60 return 0;
61 }
62