Commit b0704f85 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: vivid: fix incorrect HDMI input/output CEC logging

Only the first HDMI input has a CEC adapter, so just report 'HDMI 0' as
the HDMI input name.

For the HDMI outputs use bus_cnt instead of i as the output number.
The HDMI name now corresponds to what 'v4l2-ctl --list-outputs' reports.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 4f88b0de
...@@ -1201,8 +1201,8 @@ static int vivid_create_instance(struct platform_device *pdev, int inst) ...@@ -1201,8 +1201,8 @@ static int vivid_create_instance(struct platform_device *pdev, int inst)
goto unreg_dev; goto unreg_dev;
} }
cec_s_phys_addr(adap, 0, false); cec_s_phys_addr(adap, 0, false);
v4l2_info(&dev->v4l2_dev, "CEC adapter %s registered for HDMI input %d\n", v4l2_info(&dev->v4l2_dev, "CEC adapter %s registered for HDMI input 0\n",
dev_name(&adap->devnode.dev), i); dev_name(&adap->devnode.dev));
} }
#endif #endif
...@@ -1255,13 +1255,13 @@ static int vivid_create_instance(struct platform_device *pdev, int inst) ...@@ -1255,13 +1255,13 @@ static int vivid_create_instance(struct platform_device *pdev, int inst)
dev->cec_tx_adap[bus_cnt] = NULL; dev->cec_tx_adap[bus_cnt] = NULL;
goto unreg_dev; goto unreg_dev;
} }
v4l2_info(&dev->v4l2_dev, "CEC adapter %s registered for HDMI output %d\n",
dev_name(&adap->devnode.dev), bus_cnt);
bus_cnt++; bus_cnt++;
if (bus_cnt <= out_type_counter[HDMI]) if (bus_cnt <= out_type_counter[HDMI])
cec_s_phys_addr(adap, bus_cnt << 12, false); cec_s_phys_addr(adap, bus_cnt << 12, false);
else else
cec_s_phys_addr(adap, 0x1000, false); cec_s_phys_addr(adap, 0x1000, false);
v4l2_info(&dev->v4l2_dev, "CEC adapter %s registered for HDMI output %d\n",
dev_name(&adap->devnode.dev), i);
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment