Skip to content

Commit

Permalink
V4L/DVB (9623): tvaudio: Improve debug msg by printing something more…
Browse files Browse the repository at this point in the history
… human

Before the patch, the used ioctl were printed as an hexadecimal code,
hard to be understand without consulting the way _IO macros work.
Instead, use the V4L default handler for printing such errors into a way
that would be easier to understand.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Nov 14, 2008
1 parent 41f5230 commit c6241b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/media/video/tvaudio.c
Expand Up @@ -34,6 +34,7 @@

#include <media/tvaudio.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-chip-ident.h>
#include <media/v4l2-i2c-drv-legacy.h>

Expand Down Expand Up @@ -1732,7 +1733,10 @@ static int chip_command(struct i2c_client *client,
struct CHIPSTATE *chip = i2c_get_clientdata(client);
struct CHIPDESC *desc = chip->desc;

v4l_dbg(1, debug, chip->c, "%s: chip_command 0x%x\n", chip->c->name, cmd);
if (debug > 0) {
v4l_i2c_print_ioctl(chip->c, cmd);
printk("\n");
}

switch (cmd) {
case AUDC_SET_RADIO:
Expand Down

0 comments on commit c6241b6

Please sign in to comment.