diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-11-09 00:37:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:20 -0500 |
commit | 4ac97914c6c35f6bf132071c718e034d0846b9f5 (patch) | |
tree | 98c7eb827bb8ba99730ed89d32703a30448fd813 /drivers/media/video/msp3400.c | |
parent | a8900fc242406f25f315190a6d650f1d54617c2f (diff) |
[PATCH] v4l: 800: whitespace cleanups
- Whitespace Cleanups.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/msp3400.c')
-rw-r--r-- | drivers/media/video/msp3400.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c index 5573f68ce457..699cea2cc648 100644 --- a/drivers/media/video/msp3400.c +++ b/drivers/media/video/msp3400.c | |||
@@ -192,7 +192,7 @@ static int msp3400c_reset(struct i2c_client *client) | |||
192 | (2 != i2c_transfer(client->adapter,test,2)) ) { | 192 | (2 != i2c_transfer(client->adapter,test,2)) ) { |
193 | printk(KERN_ERR "msp3400: chip reset failed\n"); | 193 | printk(KERN_ERR "msp3400: chip reset failed\n"); |
194 | return -1; | 194 | return -1; |
195 | } | 195 | } |
196 | return 0; | 196 | return 0; |
197 | } | 197 | } |
198 | 198 | ||
@@ -200,16 +200,16 @@ static int msp3400c_read(struct i2c_client *client, int dev, int addr) | |||
200 | { | 200 | { |
201 | int err,retval; | 201 | int err,retval; |
202 | 202 | ||
203 | unsigned char write[3]; | 203 | unsigned char write[3]; |
204 | unsigned char read[2]; | 204 | unsigned char read[2]; |
205 | struct i2c_msg msgs[2] = { | 205 | struct i2c_msg msgs[2] = { |
206 | { client->addr, 0, 3, write }, | 206 | { client->addr, 0, 3, write }, |
207 | { client->addr, I2C_M_RD, 2, read } | 207 | { client->addr, I2C_M_RD, 2, read } |
208 | }; | 208 | }; |
209 | 209 | ||
210 | write[0] = dev+1; | 210 | write[0] = dev+1; |
211 | write[1] = addr >> 8; | 211 | write[1] = addr >> 8; |
212 | write[2] = addr & 0xff; | 212 | write[2] = addr & 0xff; |
213 | 213 | ||
214 | for (err = 0; err < 3;) { | 214 | for (err = 0; err < 3;) { |
215 | if (2 == i2c_transfer(client->adapter,msgs,2)) | 215 | if (2 == i2c_transfer(client->adapter,msgs,2)) |
@@ -236,13 +236,13 @@ static int msp3400c_read(struct i2c_client *client, int dev, int addr) | |||
236 | static int msp3400c_write(struct i2c_client *client, int dev, int addr, int val) | 236 | static int msp3400c_write(struct i2c_client *client, int dev, int addr, int val) |
237 | { | 237 | { |
238 | int err; | 238 | int err; |
239 | unsigned char buffer[5]; | 239 | unsigned char buffer[5]; |
240 | 240 | ||
241 | buffer[0] = dev; | 241 | buffer[0] = dev; |
242 | buffer[1] = addr >> 8; | 242 | buffer[1] = addr >> 8; |
243 | buffer[2] = addr & 0xff; | 243 | buffer[2] = addr & 0xff; |
244 | buffer[3] = val >> 8; | 244 | buffer[3] = val >> 8; |
245 | buffer[4] = val & 0xff; | 245 | buffer[4] = val & 0xff; |
246 | 246 | ||
247 | dprintk_trace("trace: msp3400c_write(0x%x, 0x%x, 0x%x)\n", dev, addr, | 247 | dprintk_trace("trace: msp3400c_write(0x%x, 0x%x, 0x%x)\n", dev, addr, |
248 | val); | 248 | val); |
@@ -812,7 +812,7 @@ static void watch_stereo(struct i2c_client *client) | |||
812 | else if (msp->stereo & VIDEO_SOUND_LANG1) | 812 | else if (msp->stereo & VIDEO_SOUND_LANG1) |
813 | msp3400c_setstereo(client, V4L2_TUNER_MODE_LANG1); | 813 | msp3400c_setstereo(client, V4L2_TUNER_MODE_LANG1); |
814 | else | 814 | else |
815 | msp3400c_setstereo(client, V4L2_TUNER_MODE_MONO); | 815 | msp3400c_setstereo(client, V4L2_TUNER_MODE_MONO); |
816 | } | 816 | } |
817 | 817 | ||
818 | if (once) | 818 | if (once) |
@@ -1512,21 +1512,21 @@ static struct i2c_client client_template = | |||
1512 | static int msp_attach(struct i2c_adapter *adap, int addr, int kind) | 1512 | static int msp_attach(struct i2c_adapter *adap, int addr, int kind) |
1513 | { | 1513 | { |
1514 | struct msp3400c *msp; | 1514 | struct msp3400c *msp; |
1515 | struct i2c_client *c; | 1515 | struct i2c_client *c; |
1516 | int (*thread_func)(void *data) = NULL; | 1516 | int (*thread_func)(void *data) = NULL; |
1517 | int i; | 1517 | int i; |
1518 | 1518 | ||
1519 | client_template.adapter = adap; | 1519 | client_template.adapter = adap; |
1520 | client_template.addr = addr; | 1520 | client_template.addr = addr; |
1521 | 1521 | ||
1522 | if (-1 == msp3400c_reset(&client_template)) { | 1522 | if (-1 == msp3400c_reset(&client_template)) { |
1523 | dprintk("msp34xx: no chip found\n"); | 1523 | dprintk("msp34xx: no chip found\n"); |
1524 | return -1; | 1524 | return -1; |
1525 | } | 1525 | } |
1526 | 1526 | ||
1527 | if (NULL == (c = kmalloc(sizeof(struct i2c_client),GFP_KERNEL))) | 1527 | if (NULL == (c = kmalloc(sizeof(struct i2c_client),GFP_KERNEL))) |
1528 | return -ENOMEM; | 1528 | return -ENOMEM; |
1529 | memcpy(c,&client_template,sizeof(struct i2c_client)); | 1529 | memcpy(c,&client_template,sizeof(struct i2c_client)); |
1530 | if (NULL == (msp = kmalloc(sizeof(struct msp3400c),GFP_KERNEL))) { | 1530 | if (NULL == (msp = kmalloc(sizeof(struct msp3400c),GFP_KERNEL))) { |
1531 | kfree(c); | 1531 | kfree(c); |
1532 | return -ENOMEM; | 1532 | return -ENOMEM; |
@@ -1618,7 +1618,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind) | |||
1618 | } | 1618 | } |
1619 | 1619 | ||
1620 | /* done */ | 1620 | /* done */ |
1621 | i2c_attach_client(c); | 1621 | i2c_attach_client(c); |
1622 | 1622 | ||
1623 | /* update our own array */ | 1623 | /* update our own array */ |
1624 | for (i = 0; i < MSP3400_MAX; i++) { | 1624 | for (i = 0; i < MSP3400_MAX; i++) { |
@@ -1739,7 +1739,7 @@ static void msp_any_set_audmode(struct i2c_client *client, int audmode) | |||
1739 | static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | 1739 | static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) |
1740 | { | 1740 | { |
1741 | struct msp3400c *msp = i2c_get_clientdata(client); | 1741 | struct msp3400c *msp = i2c_get_clientdata(client); |
1742 | __u16 *sarg = arg; | 1742 | __u16 *sarg = arg; |
1743 | int scart = 0; | 1743 | int scart = 0; |
1744 | 1744 | ||
1745 | switch (cmd) { | 1745 | switch (cmd) { |
@@ -1969,7 +1969,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
1969 | } | 1969 | } |
1970 | 1970 | ||
1971 | msp_any_detect_stereo(client); | 1971 | msp_any_detect_stereo(client); |
1972 | if (msp->audmode == V4L2_TUNER_MODE_STEREO) { | 1972 | if (msp->audmode == V4L2_TUNER_MODE_STEREO) { |
1973 | a->capability=V4L2_AUDCAP_STEREO; | 1973 | a->capability=V4L2_AUDCAP_STEREO; |
1974 | } | 1974 | } |
1975 | 1975 | ||
@@ -2005,7 +2005,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
2005 | msp3400c_set_scart(client,scart,0); | 2005 | msp3400c_set_scart(client,scart,0); |
2006 | msp3400c_write(client,I2C_MSP3400C_DFP,0x000d,0x1900); | 2006 | msp3400c_write(client,I2C_MSP3400C_DFP,0x000d,0x1900); |
2007 | } | 2007 | } |
2008 | if (sarg->capability==V4L2_AUDCAP_STEREO) { | 2008 | if (sarg->capability==V4L2_AUDCAP_STEREO) { |
2009 | msp->audmode = V4L2_TUNER_MODE_STEREO; | 2009 | msp->audmode = V4L2_TUNER_MODE_STEREO; |
2010 | } else { | 2010 | } else { |
2011 | msp->audmode &= ~V4L2_TUNER_MODE_STEREO; | 2011 | msp->audmode &= ~V4L2_TUNER_MODE_STEREO; |