Commit c29ebb64 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] dvb_frontend: print DTV property dump also for SET_PROPERTY

When debugging troubles with DTV properties get/set, it is
important to be able to see not only the properties from get, but
also the ones from set. So, improve the dumps to allow reporting
both.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 24095e76
...@@ -1162,18 +1162,24 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = { ...@@ -1162,18 +1162,24 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = {
_DTV_CMD(DTV_STAT_TOTAL_BLOCK_COUNT, 0, 0), _DTV_CMD(DTV_STAT_TOTAL_BLOCK_COUNT, 0, 0),
}; };
static void dtv_property_dump(struct dvb_frontend *fe, struct dtv_property *tvp) static void dtv_property_dump(struct dvb_frontend *fe,
bool is_set,
struct dtv_property *tvp)
{ {
int i; int i;
if (tvp->cmd <= 0 || tvp->cmd > DTV_MAX_COMMAND) { if (tvp->cmd <= 0 || tvp->cmd > DTV_MAX_COMMAND) {
dev_warn(fe->dvb->device, "%s: tvp.cmd = 0x%08x undefined\n", dev_warn(fe->dvb->device, "%s: %s tvp.cmd = 0x%08x undefined\n",
__func__, tvp->cmd); __func__,
is_set ? "SET" : "GET",
tvp->cmd);
return; return;
} }
dev_dbg(fe->dvb->device, "%s: tvp.cmd = 0x%08x (%s)\n", __func__, dev_dbg(fe->dvb->device, "%s: %s tvp.cmd = 0x%08x (%s)\n", __func__,
tvp->cmd, dtv_cmds[tvp->cmd].name); is_set ? "SET" : "GET",
tvp->cmd,
dtv_cmds[tvp->cmd].name);
if (dtv_cmds[tvp->cmd].buffer) { if (dtv_cmds[tvp->cmd].buffer) {
dev_dbg(fe->dvb->device, "%s: tvp.u.buffer.len = 0x%02x\n", dev_dbg(fe->dvb->device, "%s: tvp.u.buffer.len = 0x%02x\n",
...@@ -1589,7 +1595,7 @@ static int dtv_property_process_get(struct dvb_frontend *fe, ...@@ -1589,7 +1595,7 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
return r; return r;
} }
dtv_property_dump(fe, tvp); dtv_property_dump(fe, false, tvp);
return 0; return 0;
} }
...@@ -1830,6 +1836,8 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1830,6 +1836,8 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
return r; return r;
} }
dtv_property_dump(fe, true, tvp);
switch(tvp->cmd) { switch(tvp->cmd) {
case DTV_CLEAR: case DTV_CLEAR:
/* /*
......
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