summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/budget-av.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/budget-av.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-av.c43
1 files changed, 9 insertions, 34 deletions
diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c
index 5bc672824..036442e33 100644
--- a/linux/drivers/media/dvb/ttpci/budget-av.c
+++ b/linux/drivers/media/dvb/ttpci/budget-av.c
@@ -44,7 +44,6 @@ struct budget_av {
* INITIALIZATION
****************************************************************************/
-
static u8 i2c_readreg (struct i2c_adapter *i2c, u8 id, u8 reg)
{
u8 mm1[] = {0x00};
@@ -77,7 +76,6 @@ static int i2c_readregs(struct i2c_adapter *i2c, u8 id, u8 reg, u8 *buf, u8 len)
return 0;
}
-
static int i2c_writereg (struct i2c_adapter *i2c, u8 id, u8 reg, u8 val)
{
u8 msg[2]={ reg, val };
@@ -90,7 +88,6 @@ static int i2c_writereg (struct i2c_adapter *i2c, u8 id, u8 reg, u8 val)
return i2c_transfer(i2c, &msgs, 1);
}
-
static const u8 saa7113_tab[] = {
0x01, 0x08,
0x02, 0xc0,
@@ -120,31 +117,28 @@ static const u8 saa7113_tab[] = {
0xff
};
-
static int saa7113_init (struct budget_av *budget_av)
{
struct budget *budget = &budget_av->budget;
const u8 *data = saa7113_tab;
if (i2c_writereg (&budget->i2c_adap, 0x4a, 0x01, 0x08) != 1) {
- DEB_D(("saa7113: not found on KNC card\n"));
+ dprintk(1, "saa7113 not found on KNC card\n");
return -ENODEV;
}
- INFO(("saa7113: detected and initializing\n"));
+ dprintk(1, "saa7113 detected and initializing\n");
while (*data != 0xff) {
i2c_writereg(&budget->i2c_adap, 0x4a, *data, *(data+1));
data += 2;
}
- DEB_D(("saa7113: status=%02x\n",
- i2c_readreg(&budget->i2c_adap, 0x4a, 0x1f)));
+ dprintk(1, "saa7113 status=%02x\n", i2c_readreg(&budget->i2c_adap, 0x4a, 0x1f));
return 0;
}
-
static int saa7113_setinput (struct budget_av *budget_av, int input)
{
struct budget *budget = &budget_av->budget;
@@ -165,13 +159,12 @@ static int saa7113_setinput (struct budget_av *budget_av, int input)
return 0;
}
-
static int budget_av_detach (struct saa7146_dev *dev)
{
struct budget_av *budget_av = (struct budget_av*) dev->ext_priv;
int err;
- DEB_EE(("dev: %p\n",dev));
+ dprintk(2, "dev: %p\n", dev);
if ( 1 == budget_av->has_saa7113 ) {
saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTLO);
@@ -198,7 +191,7 @@ static int budget_av_attach (struct saa7146_dev* dev,
u8 *mac;
int err;
- DEB_EE(("dev: %p\n",dev));
+ dprintk(2, "dev: %p\n", dev);
if (bi->type != BUDGET_KNC1 && bi->type != BUDGET_CIN1200) {
return -ENODEV;
@@ -270,15 +263,12 @@ static int budget_av_attach (struct saa7146_dev* dev,
return 0;
}
-
-
#define KNC1_INPUTS 2
static struct v4l2_input knc1_inputs[KNC1_INPUTS] = {
{ 0, "Composite", V4L2_INPUT_TYPE_TUNER, 1, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
{ 1, "S-Video", V4L2_INPUT_TYPE_CAMERA, 2, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
};
-
static struct saa7146_extension_ioctls ioctls[] = {
{ VIDIOC_ENUMINPUT, SAA7146_EXCLUSIVE },
{ VIDIOC_G_INPUT, SAA7146_EXCLUSIVE },
@@ -286,7 +276,6 @@ static struct saa7146_extension_ioctls ioctls[] = {
{ 0, 0 }
};
-
static int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
struct saa7146_dev *dev = fh->dev;
@@ -299,7 +288,7 @@ static int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{
struct v4l2_input *i = arg;
- DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index));
+ dprintk(1, "VIDIOC_ENUMINPUT %d.\n", i->index);
if( i->index < 0 || i->index >= KNC1_INPUTS) {
return -EINVAL;
}
@@ -312,19 +301,16 @@ static int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
*input = budget_av->cur_input;
- DEB_EE(("VIDIOC_G_INPUT %d.\n",*input));
+ dprintk(1, "VIDIOC_G_INPUT %d.\n", *input);
return 0;
}
case VIDIOC_S_INPUT:
{
int input = *(int *)arg;
- DEB_EE(("VIDIOC_S_INPUT %d.\n", input));
+ dprintk(1, "VIDIOC_S_INPUT %d.\n", input);
return saa7113_setinput (budget_av, input);
}
default:
-/*
- DEB2(printk("does not handle this ioctl.\n"));
-*/
return -ENOIOCTLCMD;
}
return 0;
@@ -354,11 +340,8 @@ static struct saa7146_ext_vv vv_data = {
.ioctl = av_ioctl,
};
-
-
static struct saa7146_extension budget_extension;
-
MAKE_BUDGET_INFO(knc1, "KNC1 DVB-S", BUDGET_KNC1);
MAKE_BUDGET_INFO(cin1200, "TerraTec Cinergy 1200 DVB-S", BUDGET_CIN1200);
@@ -384,21 +367,13 @@ static struct saa7146_extension budget_extension = {
.irq_func = ttpci_budget_irq10_handler,
};
-
static int __init budget_av_init(void)
{
- DEB_EE((".\n"));
-
- if (saa7146_register_extension(&budget_extension))
- return -ENODEV;
-
- return 0;
+ return saa7146_register_extension(&budget_extension);
}
-
static void __exit budget_av_exit(void)
{
- DEB_EE((".\n"));
saa7146_unregister_extension(&budget_extension);
}