Skip to content

Commit

Permalink
[media] az6007: make driver less verbose
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jan 21, 2012
1 parent 067fb88 commit f2ba9e5
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions drivers/media/dvb/dvb-usb/az6007.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable)
{
struct dvb_usb_adapter *adap = fe->sec_priv;
struct az6007_device_state *st;
int status;
int status = 0;

info("%s: %s", __func__, enable ? "enable" : "disable");
deb_info("%s: %s\n", __func__, enable ? "enable" : "disable");

if (!adap)
return -EINVAL;
Expand Down Expand Up @@ -127,8 +127,7 @@ static int az6007_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
debug_dump(b, blen, deb_xfer);

if (blen > 64) {
printk(KERN_ERR
"az6007: doesn't suport I2C transactions longer than 64 bytes\n");
err("az6007: doesn't suport I2C transactions longer than 64 bytes\n");
return -EOPNOTSUPP;
}

Expand All @@ -138,7 +137,7 @@ static int az6007_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
USB_TYPE_VENDOR | USB_DIR_OUT,
value, index, b, blen, 5000);
if (ret != blen) {
warn("usb out operation failed. (%d)", ret);
err("usb out operation failed. (%d)", ret);
return -EIO;
}

Expand Down Expand Up @@ -207,7 +206,8 @@ static int az6007_frontend_poweron(struct dvb_usb_adapter *adap)
u16 index;
int blen;

info("az6007_frontend_poweron adap=%p adap->dev=%p", adap, adap->dev);
deb_info("az6007_frontend_poweron adap=%p adap->dev=%p\n",
adap, adap->dev);

req = 0xBC;
value = 1; /* power on */
Expand Down Expand Up @@ -245,7 +245,7 @@ static int az6007_frontend_poweron(struct dvb_usb_adapter *adap)
err("az6007_frontend_poweron failed!!!");
return -EIO;
}
info("az6007_frontend_poweron: OK");
deb_info("az6007_frontend_poweron: OK\n");

return 0;
}
Expand All @@ -258,7 +258,7 @@ static int az6007_frontend_reset(struct dvb_usb_adapter *adap)
u16 index;
int blen;

info("az6007_frontend_reset adap=%p adap->dev=%p", adap, adap->dev);
deb_info("az6007_frontend_reset adap=%p adap->dev=%p\n", adap, adap->dev);

/* reset demodulator */
req = 0xC0;
Expand Down Expand Up @@ -295,7 +295,7 @@ static int az6007_frontend_reset(struct dvb_usb_adapter *adap)

msleep_interruptible(200);

info("reset az6007 frontend");
deb_info("reset az6007 frontend\n");

return 0;
}
Expand Down Expand Up @@ -361,16 +361,15 @@ static int az6007_frontend_attach(struct dvb_usb_adapter *adap)
az6007_frontend_poweron(adap);
az6007_frontend_reset(adap);

info("az6007_frontend_attach: drxk");

info("az6007: attaching demod drxk");
adap->fe = dvb_attach(drxk_attach, &terratec_h7_drxk,
&adap->dev->i2c_adap, &adap->fe2);
if (!adap->fe) {
result = -EINVAL;
goto out_free;
}

info("Setting hacks");
deb_info("Setting hacks\n");

/* FIXME: do we need a pll semaphore? */
adap->fe->sec_priv = adap;
Expand All @@ -379,7 +378,7 @@ static int az6007_frontend_attach(struct dvb_usb_adapter *adap)
adap->fe->ops.i2c_gate_ctrl = drxk_gate_ctrl;
adap->fe2->id = 1;

info("az6007_frontend_attach: mt2063");
info("az6007: attaching tuner mt2063");
/* Attach mt2063 to DVB-C frontend */
if (adap->fe->ops.i2c_gate_ctrl)
adap->fe->ops.i2c_gate_ctrl(adap->fe, 1);
Expand Down Expand Up @@ -513,7 +512,7 @@ static int az6007_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
mutex_unlock(&d->i2c_mutex);

if (ret < 0) {
info("%s ERROR: %i\n", __func__, ret);
info("%s ERROR: %i", __func__, ret);
return ret;
}
return num;
Expand All @@ -538,11 +537,11 @@ int az6007_identify_state(struct usb_device *udev,
0xb7, USB_TYPE_VENDOR | USB_DIR_IN, 6, 0, b,
6, USB_CTRL_GET_TIMEOUT);

info("FW GET_VERSION length: %d", ret);
deb_info("FW GET_VERSION length: %d\n", ret);

*cold = ret <= 0;

info("cold: %d", *cold);
deb_info("cold: %d\n", *cold);
return 0;
}

Expand Down Expand Up @@ -629,7 +628,7 @@ static struct usb_driver az6007_usb_driver = {
static int __init az6007_usb_module_init(void)
{
int result;
info("az6007 usb module init");
deb_info("az6007 usb module init\n");

result = usb_register(&az6007_usb_driver);
if (result) {
Expand All @@ -643,7 +642,7 @@ static int __init az6007_usb_module_init(void)
static void __exit az6007_usb_module_exit(void)
{
/* deregister this driver from the USB subsystem */
info("az6007 usb module exit");
deb_info("az6007 usb module exit\n");
usb_deregister(&az6007_usb_driver);
}

Expand Down

0 comments on commit f2ba9e5

Please sign in to comment.