Loading drivers/media/dvb/frontends/au8522.c +15 −14 Original line number Diff line number Diff line Loading @@ -43,8 +43,12 @@ struct au8522_state { }; static int debug = 0; #define dprintk if (debug) printk static int debug; #define dprintk(arg...) do { \ if (debug) \ printk(##arg); } \ } while (0) /* 16 bit registers, 8 bit values */ static int au8522_writereg(struct au8522_state *state, u16 reg, u8 data) Loading Loading @@ -284,7 +288,8 @@ static struct mse2snr_tab qam256_mse2snr_tab[] = { { 256, 280 }, }; static int au8522_mse2snr_lookup(struct mse2snr_tab *tab, int sz, int mse, u16 *snr) static int au8522_mse2snr_lookup(struct mse2snr_tab *tab, int sz, int mse, u16 *snr) { int i, ret = -EINVAL; dprintk("%s()\n", __func__); Loading Loading @@ -469,9 +474,11 @@ static int au8522_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); } return 0; Loading Loading @@ -651,6 +658,7 @@ struct dvb_frontend *au8522_attach(const struct au8522_config *config, kfree(state); return NULL; } EXPORT_SYMBOL(au8522_attach); static struct dvb_frontend_ops au8522_ops = { Loading Loading @@ -682,10 +690,3 @@ MODULE_PARM_DESC(debug, "Enable verbose debug messages"); MODULE_DESCRIPTION("Auvitek AU8522 QAM-B/ATSC Demodulator driver"); MODULE_AUTHOR("Steven Toth"); MODULE_LICENSE("GPL"); EXPORT_SYMBOL(au8522_attach); /* * Local variables: * c-basic-offset: 8 */ drivers/media/dvb/frontends/au8522.h +3 −3 Original line number Diff line number Diff line Loading @@ -24,8 +24,7 @@ #include <linux/dvb/frontend.h> struct au8522_config { struct au8522_config { /* the demodulator's i2c address */ u8 demod_address; Loading @@ -35,7 +34,8 @@ struct au8522_config u8 status_mode; }; #if defined(CONFIG_DVB_AU8522) || (defined(CONFIG_DVB_AU8522_MODULE) && defined(MODULE)) #if defined(CONFIG_DVB_AU8522) || \ (defined(CONFIG_DVB_AU8522_MODULE) && defined(MODULE)) extern struct dvb_frontend *au8522_attach(const struct au8522_config *config, struct i2c_adapter *i2c); #else Loading drivers/media/video/au0828/au0828-cards.c +4 −5 Original line number Diff line number Diff line Loading @@ -59,8 +59,7 @@ int au0828_tuner_callback(void *priv, int command, int arg) au0828_set(dev, REG_001, 2); mdelay(50); return 0; } else { } else { printk(KERN_ERR "%s(): Unknown command.\n", __func__); return -EINVAL; Loading drivers/media/video/au0828/au0828-core.c +10 −10 Original line number Diff line number Diff line Loading @@ -32,15 +32,15 @@ * 4 = I2C related * 8 = Bridge related */ unsigned int debug = 0; unsigned int debug; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "enable debug messages"); unsigned int usb_debug = 0; unsigned int usb_debug; module_param(usb_debug, int, 0644); MODULE_PARM_DESC(usb_debug, "enable usb debug messages"); unsigned int bridge_debug = 0; unsigned int bridge_debug; module_param(bridge_debug, int, 0644); MODULE_PARM_DESC(bridge_debug, "enable bridge debug messages"); Loading @@ -66,7 +66,8 @@ u32 au0828_readreg(struct au0828_dev *dev, u16 reg) u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val) { dprintk(8, "%s(0x%x, 0x%x)\n", __func__, reg, val); return send_control_msg(dev, CMD_REQUEST_OUT, val, reg, dev->ctrlmsg, 0); return send_control_msg(dev, CMD_REQUEST_OUT, val, reg, dev->ctrlmsg, 0); } static void cmd_msg_dump(struct au0828_dev *dev) Loading @@ -74,8 +75,8 @@ static void cmd_msg_dump(struct au0828_dev *dev) int i; for (i = 0; i < sizeof(dev->ctrlmsg); i += 16) dprintk(2,"%s() %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x\n", dprintk(2, "%s() %02x %02x %02x %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x %02x %02x\n", __func__, dev->ctrlmsg[i+0], dev->ctrlmsg[i+1], dev->ctrlmsg[i+2], dev->ctrlmsg[i+3], Loading Loading @@ -136,8 +137,7 @@ static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value, if (status < 0) { printk(KERN_ERR "%s() Failed receiving control message, error %d.\n", __func__, status); } else } else cmd_msg_dump(dev); } mutex_unlock(&dev->mutex); Loading drivers/media/video/au0828/au0828-dvb.c +1 −2 Original line number Diff line number Diff line Loading @@ -111,9 +111,8 @@ static int start_urb_transfer(struct au0828_dev *dev) for (i = 0; i < URB_COUNT; i++) { dev->urbs[i] = usb_alloc_urb(0, GFP_KERNEL); if (!dev->urbs[i]) { if (!dev->urbs[i]) goto err; } purb = dev->urbs[i]; Loading Loading
drivers/media/dvb/frontends/au8522.c +15 −14 Original line number Diff line number Diff line Loading @@ -43,8 +43,12 @@ struct au8522_state { }; static int debug = 0; #define dprintk if (debug) printk static int debug; #define dprintk(arg...) do { \ if (debug) \ printk(##arg); } \ } while (0) /* 16 bit registers, 8 bit values */ static int au8522_writereg(struct au8522_state *state, u16 reg, u8 data) Loading Loading @@ -284,7 +288,8 @@ static struct mse2snr_tab qam256_mse2snr_tab[] = { { 256, 280 }, }; static int au8522_mse2snr_lookup(struct mse2snr_tab *tab, int sz, int mse, u16 *snr) static int au8522_mse2snr_lookup(struct mse2snr_tab *tab, int sz, int mse, u16 *snr) { int i, ret = -EINVAL; dprintk("%s()\n", __func__); Loading Loading @@ -469,9 +474,11 @@ static int au8522_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); } return 0; Loading Loading @@ -651,6 +658,7 @@ struct dvb_frontend *au8522_attach(const struct au8522_config *config, kfree(state); return NULL; } EXPORT_SYMBOL(au8522_attach); static struct dvb_frontend_ops au8522_ops = { Loading Loading @@ -682,10 +690,3 @@ MODULE_PARM_DESC(debug, "Enable verbose debug messages"); MODULE_DESCRIPTION("Auvitek AU8522 QAM-B/ATSC Demodulator driver"); MODULE_AUTHOR("Steven Toth"); MODULE_LICENSE("GPL"); EXPORT_SYMBOL(au8522_attach); /* * Local variables: * c-basic-offset: 8 */
drivers/media/dvb/frontends/au8522.h +3 −3 Original line number Diff line number Diff line Loading @@ -24,8 +24,7 @@ #include <linux/dvb/frontend.h> struct au8522_config { struct au8522_config { /* the demodulator's i2c address */ u8 demod_address; Loading @@ -35,7 +34,8 @@ struct au8522_config u8 status_mode; }; #if defined(CONFIG_DVB_AU8522) || (defined(CONFIG_DVB_AU8522_MODULE) && defined(MODULE)) #if defined(CONFIG_DVB_AU8522) || \ (defined(CONFIG_DVB_AU8522_MODULE) && defined(MODULE)) extern struct dvb_frontend *au8522_attach(const struct au8522_config *config, struct i2c_adapter *i2c); #else Loading
drivers/media/video/au0828/au0828-cards.c +4 −5 Original line number Diff line number Diff line Loading @@ -59,8 +59,7 @@ int au0828_tuner_callback(void *priv, int command, int arg) au0828_set(dev, REG_001, 2); mdelay(50); return 0; } else { } else { printk(KERN_ERR "%s(): Unknown command.\n", __func__); return -EINVAL; Loading
drivers/media/video/au0828/au0828-core.c +10 −10 Original line number Diff line number Diff line Loading @@ -32,15 +32,15 @@ * 4 = I2C related * 8 = Bridge related */ unsigned int debug = 0; unsigned int debug; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "enable debug messages"); unsigned int usb_debug = 0; unsigned int usb_debug; module_param(usb_debug, int, 0644); MODULE_PARM_DESC(usb_debug, "enable usb debug messages"); unsigned int bridge_debug = 0; unsigned int bridge_debug; module_param(bridge_debug, int, 0644); MODULE_PARM_DESC(bridge_debug, "enable bridge debug messages"); Loading @@ -66,7 +66,8 @@ u32 au0828_readreg(struct au0828_dev *dev, u16 reg) u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val) { dprintk(8, "%s(0x%x, 0x%x)\n", __func__, reg, val); return send_control_msg(dev, CMD_REQUEST_OUT, val, reg, dev->ctrlmsg, 0); return send_control_msg(dev, CMD_REQUEST_OUT, val, reg, dev->ctrlmsg, 0); } static void cmd_msg_dump(struct au0828_dev *dev) Loading @@ -74,8 +75,8 @@ static void cmd_msg_dump(struct au0828_dev *dev) int i; for (i = 0; i < sizeof(dev->ctrlmsg); i += 16) dprintk(2,"%s() %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x\n", dprintk(2, "%s() %02x %02x %02x %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x %02x %02x\n", __func__, dev->ctrlmsg[i+0], dev->ctrlmsg[i+1], dev->ctrlmsg[i+2], dev->ctrlmsg[i+3], Loading Loading @@ -136,8 +137,7 @@ static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value, if (status < 0) { printk(KERN_ERR "%s() Failed receiving control message, error %d.\n", __func__, status); } else } else cmd_msg_dump(dev); } mutex_unlock(&dev->mutex); Loading
drivers/media/video/au0828/au0828-dvb.c +1 −2 Original line number Diff line number Diff line Loading @@ -111,9 +111,8 @@ static int start_urb_transfer(struct au0828_dev *dev) for (i = 0; i < URB_COUNT; i++) { dev->urbs[i] = usb_alloc_urb(0, GFP_KERNEL); if (!dev->urbs[i]) { if (!dev->urbs[i]) goto err; } purb = dev->urbs[i]; Loading