aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/saa7164/saa7164-api.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-10-11 17:39:06 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 07:55:27 -0200
commitc7e242baf73a284eff92444fb58af11439e3a22c (patch)
treedb1fae0f8d0ff85d0218afe1cc1310ba20a067ba /drivers/media/video/saa7164/saa7164-api.c
parent4d270cfb36683f623f2c23f96b695deb1812476e (diff)
[media] saa7134: Fix lots os spaces at the wrong places
There are lots of checkpatch complains about: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited after that open square bracket '[' ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited before that close square bracket ']' This script should fix all of them: for i in drivers/media/video/saa7164/*.[ch]; do cat $i|perl -ne 's/\[\ +(.*)/[$1/; s/\ +\]/$1\]/g; s/\(\ +(.*)/($1/g; s/\ +\)/$1)/g; print $_;' >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-api.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-api.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c
index d1cd0f1741a..ad3bc415417 100644
--- a/drivers/media/video/saa7164/saa7164-api.c
+++ b/drivers/media/video/saa7164/saa7164-api.c
@@ -424,7 +424,7 @@ int saa7164_api_set_videomux(struct saa7164_port *port)
int ret;
dprintk(DBGLVL_ENC, "%s() v_mux=%d a_mux=%d\n",
- __func__, port->mux_input, inputs[ port->mux_input - 1 ]);
+ __func__, port->mux_input, inputs[port->mux_input - 1]);
/* Audio Mute */
ret = saa7164_api_audio_mute(port, 1);
@@ -439,7 +439,7 @@ int saa7164_api_set_videomux(struct saa7164_port *port)
/* Audio Mux */
ret = saa7164_cmd_send(port->dev, port->audfeat.sourceid, SET_CUR,
- SU_INPUT_SELECT_CONTROL, sizeof(u8), &inputs[ port->mux_input - 1 ]);
+ SU_INPUT_SELECT_CONTROL, sizeof(u8), &inputs[port->mux_input - 1]);
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
@@ -488,7 +488,7 @@ int saa7164_api_set_audio_volume(struct saa7164_port *port, s8 level)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, GET_CUR,
- ( 0x01 << 8) | VOLUME_CONTROL, sizeof(u16), &v);
+ (0x01 << 8) | VOLUME_CONTROL, sizeof(u16), &v);
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
@@ -502,18 +502,18 @@ int saa7164_api_set_audio_volume(struct saa7164_port *port, s8 level)
/* Left */
ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR,
- ( 0x01 << 8 ) | VOLUME_CONTROL, sizeof(s16), &v);
+ (0x01 << 8) | VOLUME_CONTROL, sizeof(s16), &v);
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
/* Right */
ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR,
- ( 0x02 << 8 ) | VOLUME_CONTROL, sizeof(s16), &v);
+ (0x02 << 8) | VOLUME_CONTROL, sizeof(s16), &v);
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, GET_CUR,
- ( 0x01 << 8) | VOLUME_CONTROL, sizeof(u16), &v);
+ (0x01 << 8) | VOLUME_CONTROL, sizeof(u16), &v);
if (ret != SAA_OK)
printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
@@ -735,16 +735,16 @@ int saa7164_api_initialize_dif(struct saa7164_port *port)
} else
if (port->type == SAA7164_MPEG_DVB) {
if (port->nr == SAA7164_PORT_TS1)
- p = &dev->ports[ SAA7164_PORT_ENC1 ];
+ p = &dev->ports[SAA7164_PORT_ENC1];
else
- p = &dev->ports[ SAA7164_PORT_ENC2 ];
+ p = &dev->ports[SAA7164_PORT_ENC2];
} else
if (port->type == SAA7164_MPEG_VBI) {
std = V4L2_STD_NTSC;
if (port->nr == SAA7164_PORT_VBI1)
- p = &dev->ports[ SAA7164_PORT_ENC1 ];
+ p = &dev->ports[SAA7164_PORT_ENC1];
else
- p = &dev->ports[ SAA7164_PORT_ENC2 ];
+ p = &dev->ports[SAA7164_PORT_ENC2];
} else
BUG();
@@ -926,7 +926,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
"%s(?,?,%d) sizeof(struct tmComResDescrHeader) = %d bytes\n",
__func__, len, (u32)sizeof(struct tmComResDescrHeader));
- for (idx = 0; idx < (len - sizeof(struct tmComResDescrHeader)); ) {
+ for (idx = 0; idx < (len - sizeof(struct tmComResDescrHeader));) {
hdr = (struct tmComResDescrHeader *)(buf + idx);
@@ -1056,9 +1056,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
tsfmt =
(struct tmComResTSFormatDescrHeader *)t;
if (currpath == 1)
- tsport = &dev->ports[ SAA7164_PORT_TS1 ];
+ tsport = &dev->ports[SAA7164_PORT_TS1];
else
- tsport = &dev->ports[ SAA7164_PORT_TS2 ];
+ tsport = &dev->ports[SAA7164_PORT_TS2];
memcpy(&tsport->hwcfg, vcoutputtermhdr,
sizeof(*vcoutputtermhdr));
saa7164_api_configure_port_mpeg2ts(dev,
@@ -1068,9 +1068,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
psfmt =
(struct tmComResPSFormatDescrHeader *)t;
if (currpath == 1)
- encport = &dev->ports[ SAA7164_PORT_ENC1 ];
+ encport = &dev->ports[SAA7164_PORT_ENC1];
else
- encport = &dev->ports[ SAA7164_PORT_ENC2 ];
+ encport = &dev->ports[SAA7164_PORT_ENC2];
memcpy(&encport->hwcfg, vcoutputtermhdr,
sizeof(*vcoutputtermhdr));
saa7164_api_configure_port_mpeg2ps(dev,
@@ -1080,9 +1080,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
vbifmt =
(struct tmComResVBIFormatDescrHeader *)t;
if (currpath == 1)
- vbiport = &dev->ports[ SAA7164_PORT_VBI1 ];
+ vbiport = &dev->ports[SAA7164_PORT_VBI1];
else
- vbiport = &dev->ports[ SAA7164_PORT_VBI2 ];
+ vbiport = &dev->ports[SAA7164_PORT_VBI2];
memcpy(&vbiport->hwcfg, vcoutputtermhdr,
sizeof(*vcoutputtermhdr));
memcpy(&vbiport->vbi_fmt_ntsc, vbifmt, sizeof(*vbifmt));
@@ -1129,9 +1129,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
if (tunerunithdr->unitid == tunerunithdr->iunit) {
if (currpath == 1)
- encport = &dev->ports[ SAA7164_PORT_ENC1 ];
+ encport = &dev->ports[SAA7164_PORT_ENC1];
else
- encport = &dev->ports[ SAA7164_PORT_ENC2 ];
+ encport = &dev->ports[SAA7164_PORT_ENC2];
memcpy(&encport->tunerunit, tunerunithdr,
sizeof(struct tmComResTunerDescrHeader));
dprintk(DBGLVL_API, " (becomes dev->enc[%d] tuner)\n", encport->nr);
@@ -1158,9 +1158,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
pdh->controlsize);
if (pdh->controlsize == 0x04) {
if (currpath == 1)
- encport = &dev->ports[ SAA7164_PORT_ENC1 ];
+ encport = &dev->ports[SAA7164_PORT_ENC1];
else
- encport = &dev->ports[ SAA7164_PORT_ENC2 ];
+ encport = &dev->ports[SAA7164_PORT_ENC2];
memcpy(&encport->vidproc, pdh,
sizeof(struct tmComResProcDescrHeader));
dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr);
@@ -1176,9 +1176,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
dprintk(DBGLVL_API, " controlsize = 0x%x\n",
afd->controlsize);
if (currpath == 1)
- encport = &dev->ports[ SAA7164_PORT_ENC1 ];
+ encport = &dev->ports[SAA7164_PORT_ENC1];
else
- encport = &dev->ports[ SAA7164_PORT_ENC2 ];
+ encport = &dev->ports[SAA7164_PORT_ENC2];
memcpy(&encport->audfeat, afd,
sizeof(struct tmComResAFeatureDescrHeader));
dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr);
@@ -1193,9 +1193,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
dprintk(DBGLVL_API, " iunit = 0x%x\n", edh->iunit);
if (edh->iunit == edh->unitid) {
if (currpath == 1)
- encport = &dev->ports[ SAA7164_PORT_ENC1 ];
+ encport = &dev->ports[SAA7164_PORT_ENC1];
else
- encport = &dev->ports[ SAA7164_PORT_ENC2 ];
+ encport = &dev->ports[SAA7164_PORT_ENC2];
memcpy(&encport->encunit, edh,
sizeof(struct tmComResEncoderDescrHeader));
dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr);
@@ -1257,9 +1257,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
exthdr->controlsize);
if (exthdr->devicetype & 0x80) {
if (currpath == 1)
- encport = &dev->ports[ SAA7164_PORT_ENC1 ];
+ encport = &dev->ports[SAA7164_PORT_ENC1];
else
- encport = &dev->ports[ SAA7164_PORT_ENC2 ];
+ encport = &dev->ports[SAA7164_PORT_ENC2];
memcpy(&encport->ifunit, exthdr,
sizeof(struct tmComResExtDevDescrHeader));
dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr);