V4L/DVB (9258): s5h1409: Checkpatch compliance
s5h1409: Checkpatch compliance Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
98c9482369
commit
b7709c0de2
|
@ -48,6 +48,9 @@ struct s5h1409_state {
|
|||
};
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, 0644);
|
||||
MODULE_PARM_DESC(debug, "Enable verbose debug messages");
|
||||
|
||||
#define dprintk if (debug) printk
|
||||
|
||||
/* Register values to initialise the demod, this will set VSB by default */
|
||||
|
@ -310,7 +313,7 @@ static int s5h1409_writereg(struct s5h1409_state* state, u8 reg, u16 data)
|
|||
ret = i2c_transfer(state->i2c, &msg, 1);
|
||||
|
||||
if (ret != 1)
|
||||
printk("%s: writereg error (reg == 0x%02x, val == 0x%04x, "
|
||||
printk(KERN_ERR "%s: error (reg == 0x%02x, val == 0x%04x, "
|
||||
"ret == %i)\n", __func__, reg, data, ret);
|
||||
|
||||
return (ret != 1) ? -1 : 0;
|
||||
|
@ -349,7 +352,7 @@ static int s5h1409_softreset(struct dvb_frontend* fe)
|
|||
}
|
||||
|
||||
#define S5H1409_VSB_IF_FREQ 5380
|
||||
#define S5H1409_QAM_IF_FREQ state->config->qam_if
|
||||
#define S5H1409_QAM_IF_FREQ (state->config->qam_if)
|
||||
|
||||
static int s5h1409_set_if_freq(struct dvb_frontend *fe, int KHz)
|
||||
{
|
||||
|
@ -546,9 +549,11 @@ static int s5h1409_set_frontend (struct dvb_frontend* fe,
|
|||
msleep(100);
|
||||
|
||||
if (fe->ops.tuner_ops.set_params) {
|
||||
if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1);
|
||||
if (fe->ops.i2c_gate_ctrl)
|
||||
fe->ops.i2c_gate_ctrl(fe, 1);
|
||||
fe->ops.tuner_ops.set_params(fe, p);
|
||||
if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
|
||||
if (fe->ops.i2c_gate_ctrl)
|
||||
fe->ops.i2c_gate_ctrl(fe, 0);
|
||||
}
|
||||
|
||||
/* Optimize the demod for QAM */
|
||||
|
@ -825,6 +830,7 @@ error:
|
|||
kfree(state);
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(s5h1409_attach);
|
||||
|
||||
static struct dvb_frontend_ops s5h1409_ops = {
|
||||
|
||||
|
@ -850,14 +856,10 @@ static struct dvb_frontend_ops s5h1409_ops = {
|
|||
.release = s5h1409_release,
|
||||
};
|
||||
|
||||
module_param(debug, int, 0644);
|
||||
MODULE_PARM_DESC(debug, "Enable verbose debug messages");
|
||||
|
||||
MODULE_DESCRIPTION("Samsung S5H1409 QAM-B/ATSC Demodulator driver");
|
||||
MODULE_AUTHOR("Steven Toth");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
EXPORT_SYMBOL(s5h1409_attach);
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
|
||||
#include <linux/dvb/frontend.h>
|
||||
|
||||
struct s5h1409_config
|
||||
{
|
||||
struct s5h1409_config {
|
||||
/* the demodulator's i2c address */
|
||||
u8 demod_address;
|
||||
|
||||
|
@ -60,11 +59,13 @@ struct s5h1409_config
|
|||
u16 mpeg_timing;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_DVB_S5H1409) || (defined(CONFIG_DVB_S5H1409_MODULE) && defined(MODULE))
|
||||
#if defined(CONFIG_DVB_S5H1409) || (defined(CONFIG_DVB_S5H1409_MODULE) \
|
||||
&& defined(MODULE))
|
||||
extern struct dvb_frontend *s5h1409_attach(const struct s5h1409_config *config,
|
||||
struct i2c_adapter *i2c);
|
||||
#else
|
||||
static inline struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config,
|
||||
static inline struct dvb_frontend *s5h1409_attach(
|
||||
const struct s5h1409_config *config,
|
||||
struct i2c_adapter *i2c)
|
||||
{
|
||||
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
|
||||
|
|
Loading…
Reference in New Issue