diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-11 16:39:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 05:55:27 -0400 |
commit | c7e242baf73a284eff92444fb58af11439e3a22c (patch) | |
tree | db1fae0f8d0ff85d0218afe1cc1310ba20a067ba /drivers/media/video/saa7164/saa7164-api.c | |
parent | 4d270cfb36683f623f2c23f96b695deb1812476e (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.c | 54 |
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 d1cd0f1741a3..ad3bc4154176 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) | |||
424 | int ret; | 424 | int ret; |
425 | 425 | ||
426 | dprintk(DBGLVL_ENC, "%s() v_mux=%d a_mux=%d\n", | 426 | dprintk(DBGLVL_ENC, "%s() v_mux=%d a_mux=%d\n", |
427 | __func__, port->mux_input, inputs[ port->mux_input - 1 ]); | 427 | __func__, port->mux_input, inputs[port->mux_input - 1]); |
428 | 428 | ||
429 | /* Audio Mute */ | 429 | /* Audio Mute */ |
430 | ret = saa7164_api_audio_mute(port, 1); | 430 | ret = saa7164_api_audio_mute(port, 1); |
@@ -439,7 +439,7 @@ int saa7164_api_set_videomux(struct saa7164_port *port) | |||
439 | 439 | ||
440 | /* Audio Mux */ | 440 | /* Audio Mux */ |
441 | ret = saa7164_cmd_send(port->dev, port->audfeat.sourceid, SET_CUR, | 441 | ret = saa7164_cmd_send(port->dev, port->audfeat.sourceid, SET_CUR, |
442 | SU_INPUT_SELECT_CONTROL, sizeof(u8), &inputs[ port->mux_input - 1 ]); | 442 | SU_INPUT_SELECT_CONTROL, sizeof(u8), &inputs[port->mux_input - 1]); |
443 | if (ret != SAA_OK) | 443 | if (ret != SAA_OK) |
444 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 444 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
445 | 445 | ||
@@ -488,7 +488,7 @@ int saa7164_api_set_audio_volume(struct saa7164_port *port, s8 level) | |||
488 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 488 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
489 | 489 | ||
490 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, GET_CUR, | 490 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, GET_CUR, |
491 | ( 0x01 << 8) | VOLUME_CONTROL, sizeof(u16), &v); | 491 | (0x01 << 8) | VOLUME_CONTROL, sizeof(u16), &v); |
492 | if (ret != SAA_OK) | 492 | if (ret != SAA_OK) |
493 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 493 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
494 | 494 | ||
@@ -502,18 +502,18 @@ int saa7164_api_set_audio_volume(struct saa7164_port *port, s8 level) | |||
502 | 502 | ||
503 | /* Left */ | 503 | /* Left */ |
504 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR, | 504 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR, |
505 | ( 0x01 << 8 ) | VOLUME_CONTROL, sizeof(s16), &v); | 505 | (0x01 << 8) | VOLUME_CONTROL, sizeof(s16), &v); |
506 | if (ret != SAA_OK) | 506 | if (ret != SAA_OK) |
507 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 507 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
508 | 508 | ||
509 | /* Right */ | 509 | /* Right */ |
510 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR, | 510 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR, |
511 | ( 0x02 << 8 ) | VOLUME_CONTROL, sizeof(s16), &v); | 511 | (0x02 << 8) | VOLUME_CONTROL, sizeof(s16), &v); |
512 | if (ret != SAA_OK) | 512 | if (ret != SAA_OK) |
513 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 513 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
514 | 514 | ||
515 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, GET_CUR, | 515 | ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, GET_CUR, |
516 | ( 0x01 << 8) | VOLUME_CONTROL, sizeof(u16), &v); | 516 | (0x01 << 8) | VOLUME_CONTROL, sizeof(u16), &v); |
517 | if (ret != SAA_OK) | 517 | if (ret != SAA_OK) |
518 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); | 518 | printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); |
519 | 519 | ||
@@ -735,16 +735,16 @@ int saa7164_api_initialize_dif(struct saa7164_port *port) | |||
735 | } else | 735 | } else |
736 | if (port->type == SAA7164_MPEG_DVB) { | 736 | if (port->type == SAA7164_MPEG_DVB) { |
737 | if (port->nr == SAA7164_PORT_TS1) | 737 | if (port->nr == SAA7164_PORT_TS1) |
738 | p = &dev->ports[ SAA7164_PORT_ENC1 ]; | 738 | p = &dev->ports[SAA7164_PORT_ENC1]; |
739 | else | 739 | else |
740 | p = &dev->ports[ SAA7164_PORT_ENC2 ]; | 740 | p = &dev->ports[SAA7164_PORT_ENC2]; |
741 | } else | 741 | } else |
742 | if (port->type == SAA7164_MPEG_VBI) { | 742 | if (port->type == SAA7164_MPEG_VBI) { |
743 | std = V4L2_STD_NTSC; | 743 | std = V4L2_STD_NTSC; |
744 | if (port->nr == SAA7164_PORT_VBI1) | 744 | if (port->nr == SAA7164_PORT_VBI1) |
745 | p = &dev->ports[ SAA7164_PORT_ENC1 ]; | 745 | p = &dev->ports[SAA7164_PORT_ENC1]; |
746 | else | 746 | else |
747 | p = &dev->ports[ SAA7164_PORT_ENC2 ]; | 747 | p = &dev->ports[SAA7164_PORT_ENC2]; |
748 | } else | 748 | } else |
749 | BUG(); | 749 | BUG(); |
750 | 750 | ||
@@ -926,7 +926,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
926 | "%s(?,?,%d) sizeof(struct tmComResDescrHeader) = %d bytes\n", | 926 | "%s(?,?,%d) sizeof(struct tmComResDescrHeader) = %d bytes\n", |
927 | __func__, len, (u32)sizeof(struct tmComResDescrHeader)); | 927 | __func__, len, (u32)sizeof(struct tmComResDescrHeader)); |
928 | 928 | ||
929 | for (idx = 0; idx < (len - sizeof(struct tmComResDescrHeader)); ) { | 929 | for (idx = 0; idx < (len - sizeof(struct tmComResDescrHeader));) { |
930 | 930 | ||
931 | hdr = (struct tmComResDescrHeader *)(buf + idx); | 931 | hdr = (struct tmComResDescrHeader *)(buf + idx); |
932 | 932 | ||
@@ -1056,9 +1056,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1056 | tsfmt = | 1056 | tsfmt = |
1057 | (struct tmComResTSFormatDescrHeader *)t; | 1057 | (struct tmComResTSFormatDescrHeader *)t; |
1058 | if (currpath == 1) | 1058 | if (currpath == 1) |
1059 | tsport = &dev->ports[ SAA7164_PORT_TS1 ]; | 1059 | tsport = &dev->ports[SAA7164_PORT_TS1]; |
1060 | else | 1060 | else |
1061 | tsport = &dev->ports[ SAA7164_PORT_TS2 ]; | 1061 | tsport = &dev->ports[SAA7164_PORT_TS2]; |
1062 | memcpy(&tsport->hwcfg, vcoutputtermhdr, | 1062 | memcpy(&tsport->hwcfg, vcoutputtermhdr, |
1063 | sizeof(*vcoutputtermhdr)); | 1063 | sizeof(*vcoutputtermhdr)); |
1064 | saa7164_api_configure_port_mpeg2ts(dev, | 1064 | saa7164_api_configure_port_mpeg2ts(dev, |
@@ -1068,9 +1068,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1068 | psfmt = | 1068 | psfmt = |
1069 | (struct tmComResPSFormatDescrHeader *)t; | 1069 | (struct tmComResPSFormatDescrHeader *)t; |
1070 | if (currpath == 1) | 1070 | if (currpath == 1) |
1071 | encport = &dev->ports[ SAA7164_PORT_ENC1 ]; | 1071 | encport = &dev->ports[SAA7164_PORT_ENC1]; |
1072 | else | 1072 | else |
1073 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1073 | encport = &dev->ports[SAA7164_PORT_ENC2]; |
1074 | memcpy(&encport->hwcfg, vcoutputtermhdr, | 1074 | memcpy(&encport->hwcfg, vcoutputtermhdr, |
1075 | sizeof(*vcoutputtermhdr)); | 1075 | sizeof(*vcoutputtermhdr)); |
1076 | saa7164_api_configure_port_mpeg2ps(dev, | 1076 | saa7164_api_configure_port_mpeg2ps(dev, |
@@ -1080,9 +1080,9 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len) | |||
1080 | vbifmt = | 1080 | vbifmt = |
1081 | (struct tmComResVBIFormatDescrHeader *)t; | 1081 | (struct tmComResVBIFormatDescrHeader *)t; |
1082 | if (currpath == 1) | 1082 | if (currpath == 1) |
1083 | vbiport = &dev->ports[ SAA7164_PORT_VBI1 ]; | 1083 | vbiport = &dev->ports[SAA7164_PORT_VBI1]; |
1084 | else | 1084 | else |
1085 | vbiport = &dev->ports[ SAA7164_PORT_VBI2 ]; | 1085 | vbiport = &dev->ports[SAA7164_PORT_VBI2]; |
1086 | memcpy(&vbiport->hwcfg, vcoutputtermhdr, | 1086 | memcpy(&vbiport->hwcfg, vcoutputtermhdr, |
1087 | sizeof(*vcoutputtermhdr)); | 1087 | sizeof(*vcoutputtermhdr)); |
1088 | memcpy(&vbiport->vbi_fmt_ntsc, vbifmt, sizeof(*vbifmt)); | 1088 | 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) | |||
1129 | 1129 | ||
1130 | if (tunerunithdr->unitid == tunerunithdr->iunit) { | 1130 | if (tunerunithdr->unitid == tunerunithdr->iunit) { |
1131 | if (currpath == 1) | 1131 | if (currpath == 1) |
1132 | encport = &dev->ports[ SAA7164_PORT_ENC1 ]; | 1132 | encport = &dev->ports[SAA7164_PORT_ENC1]; |
1133 | else | 1133 | else |
1134 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1134 | encport = &dev->ports[SAA7164_PORT_ENC2]; |
1135 | memcpy(&encport->tunerunit, tunerunithdr, | 1135 | memcpy(&encport->tunerunit, tunerunithdr, |
1136 | sizeof(struct tmComResTunerDescrHeader)); | 1136 | sizeof(struct tmComResTunerDescrHeader)); |
1137 | dprintk(DBGLVL_API, " (becomes dev->enc[%d] tuner)\n", encport->nr); | 1137 | 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) | |||
1158 | pdh->controlsize); | 1158 | pdh->controlsize); |
1159 | if (pdh->controlsize == 0x04) { | 1159 | if (pdh->controlsize == 0x04) { |
1160 | if (currpath == 1) | 1160 | if (currpath == 1) |
1161 | encport = &dev->ports[ SAA7164_PORT_ENC1 ]; | 1161 | encport = &dev->ports[SAA7164_PORT_ENC1]; |
1162 | else | 1162 | else |
1163 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1163 | encport = &dev->ports[SAA7164_PORT_ENC2]; |
1164 | memcpy(&encport->vidproc, pdh, | 1164 | memcpy(&encport->vidproc, pdh, |
1165 | sizeof(struct tmComResProcDescrHeader)); | 1165 | sizeof(struct tmComResProcDescrHeader)); |
1166 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); | 1166 | 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) | |||
1176 | dprintk(DBGLVL_API, " controlsize = 0x%x\n", | 1176 | dprintk(DBGLVL_API, " controlsize = 0x%x\n", |
1177 | afd->controlsize); | 1177 | afd->controlsize); |
1178 | if (currpath == 1) | 1178 | if (currpath == 1) |
1179 | encport = &dev->ports[ SAA7164_PORT_ENC1 ]; | 1179 | encport = &dev->ports[SAA7164_PORT_ENC1]; |
1180 | else | 1180 | else |
1181 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1181 | encport = &dev->ports[SAA7164_PORT_ENC2]; |
1182 | memcpy(&encport->audfeat, afd, | 1182 | memcpy(&encport->audfeat, afd, |
1183 | sizeof(struct tmComResAFeatureDescrHeader)); | 1183 | sizeof(struct tmComResAFeatureDescrHeader)); |
1184 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); | 1184 | 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) | |||
1193 | dprintk(DBGLVL_API, " iunit = 0x%x\n", edh->iunit); | 1193 | dprintk(DBGLVL_API, " iunit = 0x%x\n", edh->iunit); |
1194 | if (edh->iunit == edh->unitid) { | 1194 | if (edh->iunit == edh->unitid) { |
1195 | if (currpath == 1) | 1195 | if (currpath == 1) |
1196 | encport = &dev->ports[ SAA7164_PORT_ENC1 ]; | 1196 | encport = &dev->ports[SAA7164_PORT_ENC1]; |
1197 | else | 1197 | else |
1198 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1198 | encport = &dev->ports[SAA7164_PORT_ENC2]; |
1199 | memcpy(&encport->encunit, edh, | 1199 | memcpy(&encport->encunit, edh, |
1200 | sizeof(struct tmComResEncoderDescrHeader)); | 1200 | sizeof(struct tmComResEncoderDescrHeader)); |
1201 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); | 1201 | 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) | |||
1257 | exthdr->controlsize); | 1257 | exthdr->controlsize); |
1258 | if (exthdr->devicetype & 0x80) { | 1258 | if (exthdr->devicetype & 0x80) { |
1259 | if (currpath == 1) | 1259 | if (currpath == 1) |
1260 | encport = &dev->ports[ SAA7164_PORT_ENC1 ]; | 1260 | encport = &dev->ports[SAA7164_PORT_ENC1]; |
1261 | else | 1261 | else |
1262 | encport = &dev->ports[ SAA7164_PORT_ENC2 ]; | 1262 | encport = &dev->ports[SAA7164_PORT_ENC2]; |
1263 | memcpy(&encport->ifunit, exthdr, | 1263 | memcpy(&encport->ifunit, exthdr, |
1264 | sizeof(struct tmComResExtDevDescrHeader)); | 1264 | sizeof(struct tmComResExtDevDescrHeader)); |
1265 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); | 1265 | dprintk(DBGLVL_API, " (becomes dev->enc[%d])\n", encport->nr); |