aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/au8522.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-18 21:12:52 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:43 -0400
commit18d73c58b5ea7425db05b666408f6f682d837b73 (patch)
treed071b99fdbb10abbed2c9c81ec3ea2a2519c4ffc /drivers/media/dvb/frontends/au8522.c
parentbbdf855b0e98ba576b3577522af5e5c7503c4ed0 (diff)
V4L/DVB (7638): CodingStyle fixes for au8522 and au0828
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/au8522.c')
-rw-r--r--drivers/media/dvb/frontends/au8522.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/media/dvb/frontends/au8522.c b/drivers/media/dvb/frontends/au8522.c
index dbea1da79672..e340faacc78b 100644
--- a/drivers/media/dvb/frontends/au8522.c
+++ b/drivers/media/dvb/frontends/au8522.c
@@ -43,8 +43,12 @@ struct au8522_state {
43 43
44}; 44};
45 45
46static int debug = 0; 46static int debug;
47#define dprintk if (debug) printk 47
48#define dprintk(arg...) do { \
49 if (debug) \
50 printk(##arg); } \
51 } while (0)
48 52
49/* 16 bit registers, 8 bit values */ 53/* 16 bit registers, 8 bit values */
50static int au8522_writereg(struct au8522_state *state, u16 reg, u8 data) 54static int au8522_writereg(struct au8522_state *state, u16 reg, u8 data)
@@ -284,7 +288,8 @@ static struct mse2snr_tab qam256_mse2snr_tab[] = {
284 { 256, 280 }, 288 { 256, 280 },
285}; 289};
286 290
287static int au8522_mse2snr_lookup(struct mse2snr_tab *tab, int sz, int mse, u16 *snr) 291static int au8522_mse2snr_lookup(struct mse2snr_tab *tab, int sz, int mse,
292 u16 *snr)
288{ 293{
289 int i, ret = -EINVAL; 294 int i, ret = -EINVAL;
290 dprintk("%s()\n", __func__); 295 dprintk("%s()\n", __func__);
@@ -427,7 +432,7 @@ static int au8522_enable_modulation(struct dvb_frontend *fe,
427 432
428 dprintk("%s(0x%08x)\n", __func__, m); 433 dprintk("%s(0x%08x)\n", __func__, m);
429 434
430 switch(m) { 435 switch (m) {
431 case VSB_8: 436 case VSB_8:
432 dprintk("%s() VSB_8\n", __func__); 437 dprintk("%s() VSB_8\n", __func__);
433 for (i = 0; i < ARRAY_SIZE(VSB_mod_tab); i++) 438 for (i = 0; i < ARRAY_SIZE(VSB_mod_tab); i++)
@@ -469,9 +474,11 @@ static int au8522_set_frontend(struct dvb_frontend *fe,
469 msleep(100); 474 msleep(100);
470 475
471 if (fe->ops.tuner_ops.set_params) { 476 if (fe->ops.tuner_ops.set_params) {
472 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); 477 if (fe->ops.i2c_gate_ctrl)
478 fe->ops.i2c_gate_ctrl(fe, 1);
473 fe->ops.tuner_ops.set_params(fe, p); 479 fe->ops.tuner_ops.set_params(fe, p);
474 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); 480 if (fe->ops.i2c_gate_ctrl)
481 fe->ops.i2c_gate_ctrl(fe, 0);
475 } 482 }
476 483
477 return 0; 484 return 0;
@@ -515,7 +522,7 @@ static int au8522_read_status(struct dvb_frontend *fe, fe_status_t *status)
515 *status |= FE_HAS_LOCK | FE_HAS_SYNC; 522 *status |= FE_HAS_LOCK | FE_HAS_SYNC;
516 } 523 }
517 524
518 switch(state->config->status_mode) { 525 switch (state->config->status_mode) {
519 case AU8522_DEMODLOCKING: 526 case AU8522_DEMODLOCKING:
520 dprintk("%s() DEMODLOCKING\n", __func__); 527 dprintk("%s() DEMODLOCKING\n", __func__);
521 if (*status & FE_HAS_VITERBI) 528 if (*status & FE_HAS_VITERBI)
@@ -651,6 +658,7 @@ error:
651 kfree(state); 658 kfree(state);
652 return NULL; 659 return NULL;
653} 660}
661EXPORT_SYMBOL(au8522_attach);
654 662
655static struct dvb_frontend_ops au8522_ops = { 663static struct dvb_frontend_ops au8522_ops = {
656 664
@@ -682,10 +690,3 @@ MODULE_PARM_DESC(debug, "Enable verbose debug messages");
682MODULE_DESCRIPTION("Auvitek AU8522 QAM-B/ATSC Demodulator driver"); 690MODULE_DESCRIPTION("Auvitek AU8522 QAM-B/ATSC Demodulator driver");
683MODULE_AUTHOR("Steven Toth"); 691MODULE_AUTHOR("Steven Toth");
684MODULE_LICENSE("GPL"); 692MODULE_LICENSE("GPL");
685
686EXPORT_SYMBOL(au8522_attach);
687
688/*
689 * Local variables:
690 * c-basic-offset: 8
691 */