diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-18 21:12:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:43 -0400 |
commit | 18d73c58b5ea7425db05b666408f6f682d837b73 (patch) | |
tree | d071b99fdbb10abbed2c9c81ec3ea2a2519c4ffc /drivers/media/dvb/frontends | |
parent | bbdf855b0e98ba576b3577522af5e5c7503c4ed0 (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')
-rw-r--r-- | drivers/media/dvb/frontends/au8522.c | 29 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/au8522.h | 6 |
2 files changed, 18 insertions, 17 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 | ||
46 | static int debug = 0; | 46 | static 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 */ |
50 | static int au8522_writereg(struct au8522_state *state, u16 reg, u8 data) | 54 | static 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 | ||
287 | static int au8522_mse2snr_lookup(struct mse2snr_tab *tab, int sz, int mse, u16 *snr) | 291 | static 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 | } |
661 | EXPORT_SYMBOL(au8522_attach); | ||
654 | 662 | ||
655 | static struct dvb_frontend_ops au8522_ops = { | 663 | static struct dvb_frontend_ops au8522_ops = { |
656 | 664 | ||
@@ -682,10 +690,3 @@ MODULE_PARM_DESC(debug, "Enable verbose debug messages"); | |||
682 | MODULE_DESCRIPTION("Auvitek AU8522 QAM-B/ATSC Demodulator driver"); | 690 | MODULE_DESCRIPTION("Auvitek AU8522 QAM-B/ATSC Demodulator driver"); |
683 | MODULE_AUTHOR("Steven Toth"); | 691 | MODULE_AUTHOR("Steven Toth"); |
684 | MODULE_LICENSE("GPL"); | 692 | MODULE_LICENSE("GPL"); |
685 | |||
686 | EXPORT_SYMBOL(au8522_attach); | ||
687 | |||
688 | /* | ||
689 | * Local variables: | ||
690 | * c-basic-offset: 8 | ||
691 | */ | ||
diff --git a/drivers/media/dvb/frontends/au8522.h b/drivers/media/dvb/frontends/au8522.h index 19d5d1ef9842..d7affa3cdb27 100644 --- a/drivers/media/dvb/frontends/au8522.h +++ b/drivers/media/dvb/frontends/au8522.h | |||
@@ -24,8 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/dvb/frontend.h> | 25 | #include <linux/dvb/frontend.h> |
26 | 26 | ||
27 | struct au8522_config | 27 | struct au8522_config { |
28 | { | ||
29 | /* the demodulator's i2c address */ | 28 | /* the demodulator's i2c address */ |
30 | u8 demod_address; | 29 | u8 demod_address; |
31 | 30 | ||
@@ -35,7 +34,8 @@ struct au8522_config | |||
35 | u8 status_mode; | 34 | u8 status_mode; |
36 | }; | 35 | }; |
37 | 36 | ||
38 | #if defined(CONFIG_DVB_AU8522) || (defined(CONFIG_DVB_AU8522_MODULE) && defined(MODULE)) | 37 | #if defined(CONFIG_DVB_AU8522) || \ |
38 | (defined(CONFIG_DVB_AU8522_MODULE) && defined(MODULE)) | ||
39 | extern struct dvb_frontend *au8522_attach(const struct au8522_config *config, | 39 | extern struct dvb_frontend *au8522_attach(const struct au8522_config *config, |
40 | struct i2c_adapter *i2c); | 40 | struct i2c_adapter *i2c); |
41 | #else | 41 | #else |