diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-16 17:53:05 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-16 17:53:05 -0300 |
commit | 2cfef8fa56dee26c60b84f40cdb1b6f3a3f2824f (patch) | |
tree | e2133cfdc86e2e23595ba79eaec6423dd9e12b00 /v4l2-apps/util | |
parent | 351571009d31ec584cada4c5a8c0707271dea4ed (diff) | |
download | mediapointer-dvb-s2-2cfef8fa56dee26c60b84f40cdb1b6f3a3f2824f.tar.gz mediapointer-dvb-s2-2cfef8fa56dee26c60b84f40cdb1b6f3a3f2824f.tar.bz2 |
v4l-board-dbg: Some cleanups
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/util')
-rw-r--r-- | v4l2-apps/util/v4l-board-dbg.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/v4l2-apps/util/v4l-board-dbg.c b/v4l2-apps/util/v4l-board-dbg.c index b3a25bce9..de6b60699 100644 --- a/v4l2-apps/util/v4l-board-dbg.c +++ b/v4l2-apps/util/v4l-board-dbg.c @@ -43,7 +43,7 @@ struct board_list { struct board_list boards[] = { [0] = { /* From bttv-dbg.h */ .name = BTTV_IDENT, - .prefix = sizeof (BTTV_PREFIX), + .prefix = sizeof(BTTV_PREFIX) - 1, .regs = bt8xx_regs, .regs_size = ARRAY_SIZE(bt8xx_regs), .alt_regs = bt8xx_regs_other, @@ -51,7 +51,7 @@ struct board_list boards[] = { }, [1] = { /* From saa7134-dbg.h */ .name = SAA7134_IDENT, - .prefix = sizeof (SAA7134_PREFIX), + .prefix = sizeof(SAA7134_PREFIX) - 1, .regs = saa7134_regs, .regs_size = ARRAY_SIZE(saa7134_regs), .alt_regs = NULL, @@ -127,10 +127,6 @@ int main(int argc, char **argv) {0, 0, 0, 0} }; - /* FIXME: need to check for 'board' */ -board=1; - curr_bd = &boards[board]; - /* command args */ if (argc == 1) { usage(); @@ -193,6 +189,8 @@ board=1; exit(3); } + curr_bd = &boards[board]; + reg.match_type = V4L2_CHIP_MATCH_HOST; reg.match_chip = 0; @@ -238,7 +236,6 @@ board=1; return -1; } - for (i = curr_bd->regs_size - 1; i >=0 ; i--) { if (!strcasecmp(reg_name, curr_bd->regs[i].name)) { bd_reg = &curr_bd->regs[i]; @@ -281,7 +278,6 @@ board=1; } } - if (i < 0) { printf("Register not found\n"); return -1; |