summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/bttv-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-10-16 12:13:58 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-10-16 12:13:58 +0000
commit70f32af39cc49a27e078cfc9b4e2c31c4ba8bd53 (patch)
tree6bfab0b1cf0335dbcaf968061eff63244559e6cb /linux/drivers/media/video/bttv-i2c.c
parentb01d5877476cea7641b2a4b749ed0d47035d72b3 (diff)
downloadmediapointer-dvb-s2-70f32af39cc49a27e078cfc9b4e2c31c4ba8bd53.tar.gz
mediapointer-dvb-s2-70f32af39cc49a27e078cfc9b4e2c31c4ba8bd53.tar.bz2
- Whitespace Cleanups.
- Whitespace script improved. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/bttv-i2c.c')
-rw-r--r--linux/drivers/media/video/bttv-i2c.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c
index 937f02e42..f251ab339 100644
--- a/linux/drivers/media/video/bttv-i2c.c
+++ b/linux/drivers/media/video/bttv-i2c.c
@@ -1,12 +1,12 @@
/*
- $Id: bttv-i2c.c,v 1.28 2005/10/09 18:07:06 mchehab Exp $
+ $Id: bttv-i2c.c,v 1.29 2005/10/16 12:13:58 mchehab Exp $
bttv-i2c.c -- all the i2c code is here
bttv - Bt848 frame grabber driver
Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
- & Marcus Metzler (mocm@thp.uni-koeln.de)
+ & Marcus Metzler (mocm@thp.uni-koeln.de)
(c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
This program is free software; you can redistribute it and/or modify
@@ -242,7 +242,7 @@ bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
err:
if (i2c_debug)
printk(" ERR: %d\n",retval);
- return retval;
+ return retval;
}
static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
@@ -297,7 +297,7 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = {
static int attach_inform(struct i2c_client *client)
{
- struct bttv *btv = i2c_get_adapdata(client->adapter);
+ struct bttv *btv = i2c_get_adapdata(client->adapter);
if (bttv_debug)
printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n",
@@ -307,9 +307,9 @@ static int attach_inform(struct i2c_client *client)
return 0;
if (btv->tuner_type != UNSET) {
- struct tuner_setup tun_setup;
+ struct tuner_setup tun_setup;
- tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
+ tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.type = btv->tuner_type;
tun_setup.addr = ADDR_UNSET;
@@ -319,7 +319,7 @@ static int attach_inform(struct i2c_client *client)
if (btv->pinnacle_id != UNSET)
client->driver->command(client,AUDC_CONFIG_PINNACLE,
&btv->pinnacle_id);
- return 0;
+ return 0;
}
void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg)
@@ -337,43 +337,43 @@ static struct i2c_client bttv_i2c_client_template = {
/* read I2C */
int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
{
- unsigned char buffer = 0;
+ unsigned char buffer = 0;
if (0 != btv->i2c_rc)
return -1;
if (bttv_verbose && NULL != probe_for)
printk(KERN_INFO "bttv%d: i2c: checking for %s @ 0x%02x... ",
btv->c.nr,probe_for,addr);
- btv->i2c_client.addr = addr >> 1;
- if (1 != i2c_master_recv(&btv->i2c_client, &buffer, 1)) {
+ btv->i2c_client.addr = addr >> 1;
+ if (1 != i2c_master_recv(&btv->i2c_client, &buffer, 1)) {
if (NULL != probe_for) {
if (bttv_verbose)
printk("not found\n");
} else
printk(KERN_WARNING "bttv%d: i2c read 0x%x: error\n",
btv->c.nr,addr);
- return -1;
+ return -1;
}
if (bttv_verbose && NULL != probe_for)
printk("found\n");
- return buffer;
+ return buffer;
}
/* write I2C */
int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
- unsigned char b2, int both)
+ unsigned char b2, int both)
{
- unsigned char buffer[2];
- int bytes = both ? 2 : 1;
+ unsigned char buffer[2];
+ int bytes = both ? 2 : 1;
if (0 != btv->i2c_rc)
return -1;
- btv->i2c_client.addr = addr >> 1;
- buffer[0] = b1;
- buffer[1] = b2;
- if (bytes != i2c_master_send(&btv->i2c_client, buffer, bytes))
+ btv->i2c_client.addr = addr >> 1;
+ buffer[0] = b1;
+ buffer[1] = b2;
+ if (bytes != i2c_master_send(&btv->i2c_client, buffer, bytes))
return -1;
- return 0;
+ return 0;
}
/* read EEPROM content */
@@ -440,8 +440,8 @@ int __devinit init_bttv_i2c(struct bttv *btv)
"bt%d #%d [%s]", btv->id, btv->c.nr,
btv->use_i2c_hw ? "hw" : "sw");
- i2c_set_adapdata(&btv->c.i2c_adap, btv);
- btv->i2c_client.adapter = &btv->c.i2c_adap;
+ i2c_set_adapdata(&btv->c.i2c_adap, btv);
+ btv->i2c_client.adapter = &btv->c.i2c_adap;
#ifdef I2C_CLASS_TV_ANALOG
if (bttv_tvcards[btv->c.type].no_video)