[media] saa7164: Don't use typedefs
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 11 Oct 2010 20:17:45 +0000 (17:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 09:55:26 +0000 (07:55 -0200)
According with CodingStyle, drivers shouldn't use typedef, except on very
special cases. This is not the case of saa7164. So, convert all usecases
to struct/enum.

After changing the saa7164-types.h, all we need to do is to run those scripts
to fix all occurrences of the bad types and double check/fix everything that
might be broken after the test (of course, I did a small script to generate those scripts).

for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmBusType_t/enum tmBusType/; print " \>a \&\& mv a tmBusType; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResCmd_t/enum tmComResCmd/; print " \>a \&\& mv a tmComResCmd; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResTermType_t/enum tmComResTermType/; print " \>a \&\& mv a tmComResTermType; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmBufferFlag_t/enum tmBufferFlag/; print " \>a \&\& mv a tmBufferFlag; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResHWDescr_t/struct tmComResHWDescr/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResInterfaceDescr_t/struct tmComResInterfaceDescr/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResBusDescr_t/struct tmComResBusDescr/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmBusType_t/struct tmBusType/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResBusInfo_t/struct tmComResBusInfo/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResInfo_t/struct tmComResInfo/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResCmd_t/struct tmComResCmd/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmDescriptor_t/struct tmDescriptor/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResDescrHeader_t/struct tmComResDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResExtDevDescrHeader_t/struct tmComResExtDevDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResGPIO_t/struct tmComResGPIO/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResPathDescrHeader_t/struct tmComResPathDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResTermType_t/struct tmComResTermType/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResAntTermDescrHeader_t/struct tmComResAntTermDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResTunerDescrHeader_t/struct tmComResTunerDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmBufferFlag_t/struct tmBufferFlag/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmBuffer_t/struct tmBuffer/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmHWStreamParameters_t/struct tmHWStreamParameters/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmStreamParameters_t/struct tmStreamParameters/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResDMATermDescrHeader_t/struct tmComResDMATermDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResTSFormatDescrHeader_t/struct tmComResTSFormatDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResSelDescrHeader_t/struct tmComResSelDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResProcDescrHeader_t/struct tmComResProcDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResEncVideoBitRate_t/struct tmComResEncVideoBitRate/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResEncVideoInputAspectRatio_t/struct tmComResEncVideoInputAspectRatio/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResEncVideoGopStructure_t/struct tmComResEncVideoGopStructure/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResEncoderDescrHeader_t/struct tmComResEncoderDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResAFeatureDescrHeader_t/struct tmComResAFeatureDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResAudioDefaults_t/struct tmComResAudioDefaults/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResEncAudioBitRate_t/struct tmComResEncAudioBitRate/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResTunerStandard_t/struct tmComResTunerStandard/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResTunerStandardAuto_t/struct tmComResTunerStandardAuto/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResPSFormatDescrHeader_t/struct tmComResPSFormatDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResVBIFormatDescrHeader_t/struct tmComResVBIFormatDescrHeader/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResProbeCommit_t/struct tmComResProbeCommit/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResDebugSetLevel_t/struct tmComResDebugSetLevel/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmComResDebugGetData_t/struct tmComResDebugGetData/g; print " $i >a && mv a $i; done
for i in drivers/media/video/saa7164/*.[ch]; do perl -ne "s/tmFwInfoStruct_t/struct tmFwInfoStruct/g; print " $i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7164/saa7164-api.c
drivers/media/video/saa7164/saa7164-buffer.c
drivers/media/video/saa7164/saa7164-bus.c
drivers/media/video/saa7164/saa7164-cmd.c
drivers/media/video/saa7164/saa7164-core.c
drivers/media/video/saa7164/saa7164-encoder.c
drivers/media/video/saa7164/saa7164-types.h
drivers/media/video/saa7164/saa7164-vbi.c
drivers/media/video/saa7164/saa7164.h

index 045d9094d9ad58bbf75aaaddb7e4fc229a765abf..d1cd0f1741a3a482b7363baca2a34737af5b835e 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "saa7164.h"
 
-int saa7164_api_get_load_info(struct saa7164_dev *dev, tmFwInfoStruct_t *i)
+int saa7164_api_get_load_info(struct saa7164_dev *dev, struct tmFwInfoStruct *i)
 {
        int ret;
 
@@ -39,7 +39,7 @@ int saa7164_api_get_load_info(struct saa7164_dev *dev, tmFwInfoStruct_t *i)
        i->status = 0;
 
        ret = saa7164_cmd_send(dev, 0, GET_CUR,
-               GET_FW_STATUS_CONTROL, sizeof(tmFwInfoStruct_t), i);
+               GET_FW_STATUS_CONTROL, sizeof(struct tmFwInfoStruct), i);
        if (ret != SAA_OK) {
                printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
        }
@@ -51,7 +51,7 @@ int saa7164_api_get_load_info(struct saa7164_dev *dev, tmFwInfoStruct_t *i)
 
 int saa7164_api_collect_debug(struct saa7164_dev *dev)
 {
-       tmComResDebugGetData_t d;
+       struct tmComResDebugGetData d;
        u8 more = 255;
        int ret;
 
@@ -78,7 +78,7 @@ int saa7164_api_collect_debug(struct saa7164_dev *dev)
 
 int saa7164_api_set_debug(struct saa7164_dev *dev, u8 level)
 {
-       tmComResDebugSetLevel_t lvl;
+       struct tmComResDebugSetLevel lvl;
        int ret;
 
        dprintk(DBGLVL_API, "%s(level=%d)\n", __func__, level);
@@ -106,7 +106,7 @@ int saa7164_api_set_debug(struct saa7164_dev *dev, u8 level)
 int saa7164_api_set_vbi_format(struct saa7164_port *port)
 {
        struct saa7164_dev *dev = port->dev;
-       tmComResProbeCommit_t fmt, rsp;
+       struct tmComResProbeCommit fmt, rsp;
        int ret;
 
        dprintk(DBGLVL_API, "%s(nr=%d, unitid=0x%x)\n", __func__,
@@ -167,7 +167,7 @@ int saa7164_api_set_vbi_format(struct saa7164_port *port)
 int saa7164_api_set_gop_size(struct saa7164_port *port)
 {
        struct saa7164_dev *dev = port->dev;
-       tmComResEncVideoGopStructure_t gs;
+       struct tmComResEncVideoGopStructure gs;
        int ret;
 
        dprintk(DBGLVL_ENC, "%s()\n", __func__);
@@ -186,8 +186,8 @@ int saa7164_api_set_gop_size(struct saa7164_port *port)
 int saa7164_api_set_encoder(struct saa7164_port *port)
 {
        struct saa7164_dev *dev = port->dev;
-       tmComResEncVideoBitRate_t vb;
-       tmComResEncAudioBitRate_t ab;
+       struct tmComResEncVideoBitRate vb;
+       struct tmComResEncAudioBitRate ab;
        int ret;
 
        dprintk(DBGLVL_ENC, "%s() unitid=0x%x\n", __func__,
@@ -217,7 +217,7 @@ int saa7164_api_set_encoder(struct saa7164_port *port)
        vb.dwVideoBitRate = port->encoder_params.bitrate;
        vb.dwVideoBitRatePeak = port->encoder_params.bitrate_peak;
        ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR,
-               EU_VIDEO_BIT_RATE_CONTROL, sizeof(tmComResEncVideoBitRate_t), &vb);
+               EU_VIDEO_BIT_RATE_CONTROL, sizeof(struct tmComResEncVideoBitRate), &vb);
        if (ret != SAA_OK)
                printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
 
@@ -226,7 +226,7 @@ int saa7164_api_set_encoder(struct saa7164_port *port)
        ab.dwAudioBitRate = 384000;
        ab.dwAudioBitRatePeak = ab.dwAudioBitRate;
        ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR,
-               EU_AUDIO_BIT_RATE_CONTROL, sizeof(tmComResEncAudioBitRate_t), &ab);
+               EU_AUDIO_BIT_RATE_CONTROL, sizeof(struct tmComResEncAudioBitRate), &ab);
        if (ret != SAA_OK)
                printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
 
@@ -239,9 +239,9 @@ int saa7164_api_set_encoder(struct saa7164_port *port)
 int saa7164_api_get_encoder(struct saa7164_port *port)
 {
        struct saa7164_dev *dev = port->dev;
-       tmComResEncVideoBitRate_t v;
-       tmComResEncAudioBitRate_t a;
-       tmComResEncVideoInputAspectRatio_t ar;
+       struct tmComResEncVideoBitRate v;
+       struct tmComResEncAudioBitRate a;
+       struct tmComResEncVideoInputAspectRatio ar;
        int ret;
 
        dprintk(DBGLVL_ENC, "%s() unitid=0x%x\n", __func__, port->hwcfg.sourceid);
@@ -286,7 +286,7 @@ int saa7164_api_get_encoder(struct saa7164_port *port)
        ar.height = 0;
        ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, GET_CUR,
                EU_VIDEO_INPUT_ASPECT_CONTROL,
-               sizeof(tmComResEncVideoInputAspectRatio_t), &ar);
+               sizeof(struct tmComResEncVideoInputAspectRatio), &ar);
        if (ret != SAA_OK)
                printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
 
@@ -308,7 +308,7 @@ int saa7164_api_get_encoder(struct saa7164_port *port)
 int saa7164_api_set_aspect_ratio(struct saa7164_port *port)
 {
        struct saa7164_dev *dev = port->dev;
-       tmComResEncVideoInputAspectRatio_t ar;
+       struct tmComResEncVideoInputAspectRatio ar;
        int ret;
 
        dprintk(DBGLVL_ENC, "%s(%d)\n", __func__,
@@ -342,7 +342,7 @@ int saa7164_api_set_aspect_ratio(struct saa7164_port *port)
        /* Aspect Ratio */
        ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR,
                EU_VIDEO_INPUT_ASPECT_CONTROL,
-               sizeof(tmComResEncVideoInputAspectRatio_t), &ar);
+               sizeof(struct tmComResEncVideoInputAspectRatio), &ar);
        if (ret != SAA_OK)
                printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
 
@@ -525,8 +525,8 @@ int saa7164_api_set_audio_volume(struct saa7164_port *port, s8 level)
 int saa7164_api_set_audio_std(struct saa7164_port *port)
 {
        struct saa7164_dev *dev = port->dev;
-       tmComResAudioDefaults_t lvl;
-       tmComResTunerStandard_t tvaudio;
+       struct tmComResAudioDefaults lvl;
+       struct tmComResTunerStandard tvaudio;
        int ret;
 
        dprintk(DBGLVL_API, "%s()\n", __func__);
@@ -539,7 +539,7 @@ int saa7164_api_set_audio_std(struct saa7164_port *port)
        lvl.ucSAP_Level = TMHW_LEV_ADJ_SAPLEV_DEFAULT;
        lvl.ucADC_Level = TMHW_LEV_ADJ_ADCLEV_DEFAULT;
        ret = saa7164_cmd_send(port->dev, port->audfeat.unitid, SET_CUR,
-               AUDIO_DEFAULT_CONTROL, sizeof(tmComResAudioDefaults_t), &lvl);
+               AUDIO_DEFAULT_CONTROL, sizeof(struct tmComResAudioDefaults), &lvl);
        if (ret != SAA_OK)
                printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret);
 
@@ -562,7 +562,7 @@ int saa7164_api_set_audio_std(struct saa7164_port *port)
 int saa7164_api_set_audio_detection(struct saa7164_port *port, int autodetect)
 {
        struct saa7164_dev *dev = port->dev;
-       tmComResTunerStandardAuto_t p;
+       struct tmComResTunerStandardAuto p;
        int ret;
 
        dprintk(DBGLVL_API, "%s(%d)\n", __func__, autodetect);
@@ -800,7 +800,7 @@ int saa7164_api_read_eeprom(struct saa7164_dev *dev, u8 *buf, int buflen)
 int saa7164_api_configure_port_vbi(struct saa7164_dev *dev,
        struct saa7164_port *port)
 {
-       tmComResVBIFormatDescrHeader_t *fmt = &port->vbi_fmt_ntsc;
+       struct tmComResVBIFormatDescrHeader *fmt = &port->vbi_fmt_ntsc;
 
        dprintk(DBGLVL_API, "    bFormatIndex  = 0x%x\n", fmt->bFormatIndex);
        dprintk(DBGLVL_API, "    VideoStandard = 0x%x\n", fmt->VideoStandard);
@@ -835,7 +835,7 @@ int saa7164_api_configure_port_vbi(struct saa7164_dev *dev,
 
 int saa7164_api_configure_port_mpeg2ts(struct saa7164_dev *dev,
        struct saa7164_port *port,
-       tmComResTSFormatDescrHeader_t *tsfmt)
+       struct tmComResTSFormatDescrHeader *tsfmt)
 {
        dprintk(DBGLVL_API, "    bFormatIndex = 0x%x\n", tsfmt->bFormatIndex);
        dprintk(DBGLVL_API, "    bDataOffset  = 0x%x\n", tsfmt->bDataOffset);
@@ -869,7 +869,7 @@ int saa7164_api_configure_port_mpeg2ts(struct saa7164_dev *dev,
 
 int saa7164_api_configure_port_mpeg2ps(struct saa7164_dev *dev,
        struct saa7164_port *port,
-       tmComResPSFormatDescrHeader_t *fmt)
+       struct tmComResPSFormatDescrHeader *fmt)
 {
        dprintk(DBGLVL_API, "    bFormatIndex = 0x%x\n", fmt->bFormatIndex);
        dprintk(DBGLVL_API, "    wPacketLength= 0x%x\n", fmt->wPacketLength);
@@ -907,28 +907,28 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
        struct saa7164_port *vbiport = 0;
        u32 idx, next_offset;
        int i;
-       tmComResDescrHeader_t *hdr, *t;
-       tmComResExtDevDescrHeader_t *exthdr;
-       tmComResPathDescrHeader_t *pathhdr;
-       tmComResAntTermDescrHeader_t *anttermhdr;
-       tmComResTunerDescrHeader_t *tunerunithdr;
-       tmComResDMATermDescrHeader_t *vcoutputtermhdr;
-       tmComResTSFormatDescrHeader_t *tsfmt;
-       tmComResPSFormatDescrHeader_t *psfmt;
-       tmComResSelDescrHeader_t *psel;
-       tmComResProcDescrHeader_t *pdh;
-       tmComResAFeatureDescrHeader_t *afd;
-       tmComResEncoderDescrHeader_t *edh;
-       tmComResVBIFormatDescrHeader_t *vbifmt;
+       struct tmComResDescrHeader *hdr, *t;
+       struct tmComResExtDevDescrHeader *exthdr;
+       struct tmComResPathDescrHeader *pathhdr;
+       struct tmComResAntTermDescrHeader *anttermhdr;
+       struct tmComResTunerDescrHeader *tunerunithdr;
+       struct tmComResDMATermDescrHeader *vcoutputtermhdr;
+       struct tmComResTSFormatDescrHeader *tsfmt;
+       struct tmComResPSFormatDescrHeader *psfmt;
+       struct tmComResSelDescrHeader *psel;
+       struct tmComResProcDescrHeader *pdh;
+       struct tmComResAFeatureDescrHeader *afd;
+       struct tmComResEncoderDescrHeader *edh;
+       struct tmComResVBIFormatDescrHeader *vbifmt;
        u32 currpath = 0;
 
        dprintk(DBGLVL_API,
-               "%s(?,?,%d) sizeof(tmComResDescrHeader_t) = %d bytes\n",
-               __func__, len, (u32)sizeof(tmComResDescrHeader_t));
+               "%s(?,?,%d) sizeof(struct tmComResDescrHeader) = %d bytes\n",
+               __func__, len, (u32)sizeof(struct tmComResDescrHeader));
 
-       for (idx = 0; idx < (len - sizeof(tmComResDescrHeader_t)); ) {
+       for (idx = 0; idx < (len - sizeof(struct tmComResDescrHeader)); ) {
 
-               hdr = (tmComResDescrHeader_t *)(buf + idx);
+               hdr = (struct tmComResDescrHeader *)(buf + idx);
 
                if (hdr->type != CS_INTERFACE)
                        return SAA_ERR_NOT_SUPPORTED;
@@ -940,7 +940,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                        break;
                case VC_TUNER_PATH:
                        dprintk(DBGLVL_API, " VC_TUNER_PATH\n");
-                       pathhdr = (tmComResPathDescrHeader_t *)(buf + idx);
+                       pathhdr = (struct tmComResPathDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, "  pathid = 0x%x\n",
                                pathhdr->pathid);
                        currpath = pathhdr->pathid;
@@ -948,7 +948,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                case VC_INPUT_TERMINAL:
                        dprintk(DBGLVL_API, " VC_INPUT_TERMINAL\n");
                        anttermhdr =
-                               (tmComResAntTermDescrHeader_t *)(buf + idx);
+                               (struct tmComResAntTermDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, "  terminalid   = 0x%x\n",
                                anttermhdr->terminalid);
                        dprintk(DBGLVL_API, "  terminaltype = 0x%x\n",
@@ -991,7 +991,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                case VC_OUTPUT_TERMINAL:
                        dprintk(DBGLVL_API, " VC_OUTPUT_TERMINAL\n");
                        vcoutputtermhdr =
-                               (tmComResDMATermDescrHeader_t *)(buf + idx);
+                               (struct tmComResDMATermDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, "  unitid = 0x%x\n",
                                vcoutputtermhdr->unitid);
                        dprintk(DBGLVL_API, "  terminaltype = 0x%x\n",
@@ -1045,16 +1045,16 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                        dprintk(DBGLVL_API, "  numformats   = 0x%x\n",
                                vcoutputtermhdr->numformats);
 
-                       t = (tmComResDescrHeader_t *)
-                               ((tmComResDMATermDescrHeader_t *)(buf + idx));
+                       t = (struct tmComResDescrHeader *)
+                               ((struct tmComResDMATermDescrHeader *)(buf + idx));
                        next_offset = idx + (vcoutputtermhdr->len);
                        for (i = 0; i < vcoutputtermhdr->numformats; i++) {
-                               t = (tmComResDescrHeader_t *)
+                               t = (struct tmComResDescrHeader *)
                                        (buf + next_offset);
                                switch (t->subtype) {
                                case VS_FORMAT_MPEG2TS:
                                        tsfmt =
-                                       (tmComResTSFormatDescrHeader_t *)t;
+                                       (struct tmComResTSFormatDescrHeader *)t;
                                        if (currpath == 1)
                                                tsport = &dev->ports[ SAA7164_PORT_TS1 ];
                                        else
@@ -1066,7 +1066,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                                        break;
                                case VS_FORMAT_MPEG2PS:
                                        psfmt =
-                                       (tmComResPSFormatDescrHeader_t *)t;
+                                       (struct tmComResPSFormatDescrHeader *)t;
                                        if (currpath == 1)
                                                encport = &dev->ports[ SAA7164_PORT_ENC1 ];
                                        else
@@ -1078,7 +1078,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                                        break;
                                case VS_FORMAT_VBI:
                                        vbifmt =
-                                       (tmComResVBIFormatDescrHeader_t *)t;
+                                       (struct tmComResVBIFormatDescrHeader *)t;
                                        if (currpath == 1)
                                                vbiport = &dev->ports[ SAA7164_PORT_VBI1 ];
                                        else
@@ -1113,7 +1113,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                case TUNER_UNIT:
                        dprintk(DBGLVL_API, " TUNER_UNIT\n");
                        tunerunithdr =
-                               (tmComResTunerDescrHeader_t *)(buf + idx);
+                               (struct tmComResTunerDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, "  unitid = 0x%x\n",
                                tunerunithdr->unitid);
                        dprintk(DBGLVL_API, "  sourceid = 0x%x\n",
@@ -1133,12 +1133,12 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                                else
                                        encport = &dev->ports[ SAA7164_PORT_ENC2 ];
                                memcpy(&encport->tunerunit, tunerunithdr,
-                                       sizeof(tmComResTunerDescrHeader_t));
+                                       sizeof(struct tmComResTunerDescrHeader));
                                dprintk(DBGLVL_API, "  (becomes dev->enc[%d] tuner)\n", encport->nr);
                        }
                        break;
                case VC_SELECTOR_UNIT:
-                       psel = (tmComResSelDescrHeader_t *)(buf + idx);
+                       psel = (struct tmComResSelDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, " VC_SELECTOR_UNIT\n");
                        dprintk(DBGLVL_API, "  unitid = 0x%x\n",
                                psel->unitid);
@@ -1148,7 +1148,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                                psel->sourceid);
                        break;
                case VC_PROCESSING_UNIT:
-                       pdh = (tmComResProcDescrHeader_t *)(buf + idx);
+                       pdh = (struct tmComResProcDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, " VC_PROCESSING_UNIT\n");
                        dprintk(DBGLVL_API, "  unitid = 0x%x\n",
                                pdh->unitid);
@@ -1162,12 +1162,12 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                                else
                                        encport = &dev->ports[ SAA7164_PORT_ENC2 ];
                                memcpy(&encport->vidproc, pdh,
-                                       sizeof(tmComResProcDescrHeader_t));
+                                       sizeof(struct tmComResProcDescrHeader));
                                dprintk(DBGLVL_API, "  (becomes dev->enc[%d])\n", encport->nr);
                        }
                        break;
                case FEATURE_UNIT:
-                       afd = (tmComResAFeatureDescrHeader_t *)(buf + idx);
+                       afd = (struct tmComResAFeatureDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, " FEATURE_UNIT\n");
                        dprintk(DBGLVL_API, "  unitid = 0x%x\n",
                                afd->unitid);
@@ -1180,11 +1180,11 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                        else
                                encport = &dev->ports[ SAA7164_PORT_ENC2 ];
                        memcpy(&encport->audfeat, afd,
-                               sizeof(tmComResAFeatureDescrHeader_t));
+                               sizeof(struct tmComResAFeatureDescrHeader));
                        dprintk(DBGLVL_API, "  (becomes dev->enc[%d])\n", encport->nr);
                        break;
                case ENCODER_UNIT:
-                       edh = (tmComResEncoderDescrHeader_t *)(buf + idx);
+                       edh = (struct tmComResEncoderDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, " ENCODER_UNIT\n");
                        dprintk(DBGLVL_API, "  subtype = 0x%x\n", edh->subtype);
                        dprintk(DBGLVL_API, "  unitid = 0x%x\n", edh->unitid);
@@ -1197,13 +1197,13 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                                else
                                        encport = &dev->ports[ SAA7164_PORT_ENC2 ];
                                memcpy(&encport->encunit, edh,
-                                       sizeof(tmComResEncoderDescrHeader_t));
+                                       sizeof(struct tmComResEncoderDescrHeader));
                                dprintk(DBGLVL_API, "  (becomes dev->enc[%d])\n", encport->nr);
                        }
                        break;
                case EXTENSION_UNIT:
                        dprintk(DBGLVL_API, " EXTENSION_UNIT\n");
-                       exthdr = (tmComResExtDevDescrHeader_t *)(buf + idx);
+                       exthdr = (struct tmComResExtDevDescrHeader *)(buf + idx);
                        dprintk(DBGLVL_API, "  unitid = 0x%x\n",
                                exthdr->unitid);
                        dprintk(DBGLVL_API, "  deviceid = 0x%x\n",
@@ -1261,7 +1261,7 @@ int saa7164_api_dump_subdevs(struct saa7164_dev *dev, u8 *buf, int len)
                                else
                                        encport = &dev->ports[ SAA7164_PORT_ENC2 ];
                                memcpy(&encport->ifunit, exthdr,
-                                       sizeof(tmComResExtDevDescrHeader_t));
+                                       sizeof(struct tmComResExtDevDescrHeader));
                                dprintk(DBGLVL_API, "  (becomes dev->enc[%d])\n", encport->nr);
                        }
                        break;
@@ -1464,7 +1464,7 @@ int saa7164_api_modify_gpio(struct saa7164_dev *dev, u8 unitid,
        u8 pin, u8 state)
 {
        int ret;
-       tmComResGPIO_t t;
+       struct tmComResGPIO t;
 
        dprintk(DBGLVL_API, "%s(0x%x, %d, %d)\n",
                __func__, unitid, pin, state);
index 2afe9f1a6c87430b007048a1acaf086a60596b61..7230912acc7dfd3fb22eddb5586298fe81a12969 100644 (file)
@@ -92,7 +92,7 @@ void saa7164_buffer_display(struct saa7164_buffer *buf)
 struct saa7164_buffer *saa7164_buffer_alloc(struct saa7164_port *port,
        u32 len)
 {
-       tmHWStreamParameters_t *params = &port->hw_streamingparams;
+       struct tmHWStreamParameters *params = &port->hw_streamingparams;
        struct saa7164_buffer *buf = 0;
        struct saa7164_dev *dev = port->dev;
        int i;
@@ -234,7 +234,7 @@ int saa7164_buffer_activate(struct saa7164_buffer *buf, int i)
 
 int saa7164_buffer_cfg_port(struct saa7164_port *port)
 {
-       tmHWStreamParameters_t *params = &port->hw_streamingparams;
+       struct tmHWStreamParameters *params = &port->hw_streamingparams;
        struct saa7164_dev *dev = port->dev;
        struct saa7164_buffer *buf;
        struct list_head *c, *n;
index 78ccf1acdc5cabf20f806de3335da60d8aeeec13..30d5283da41e31826e9c7c24d754f799e96cf4fe 100644 (file)
@@ -26,7 +26,7 @@
  */
 int saa7164_bus_setup(struct saa7164_dev *dev)
 {
-       tmComResBusInfo_t *b    = &dev->bus;
+       struct tmComResBusInfo *b       = &dev->bus;
 
        mutex_init(&b->lock);
 
@@ -54,7 +54,7 @@ int saa7164_bus_setup(struct saa7164_dev *dev)
 
 void saa7164_bus_dump(struct saa7164_dev *dev)
 {
-       tmComResBusInfo_t *b = &dev->bus;
+       struct tmComResBusInfo *b = &dev->bus;
 
        dprintk(DBGLVL_BUS, "Dumping the bus structure:\n");
        dprintk(DBGLVL_BUS, " .type             = %d\n", b->Type);
@@ -82,7 +82,7 @@ void saa7164_bus_dump(struct saa7164_dev *dev)
 /* Intensionally throw a BUG() if the state of the message bus looks corrupt */
 void saa7164_bus_verify(struct saa7164_dev *dev)
 {
-       tmComResBusInfo_t *b = &dev->bus;
+       struct tmComResBusInfo *b = &dev->bus;
        int bug = 0;
 
        if (saa7164_readl(b->m_dwSetReadPos) > b->m_dwSizeSetRing)
@@ -105,7 +105,7 @@ void saa7164_bus_verify(struct saa7164_dev *dev)
        }
 }
 
-void saa7164_bus_dumpmsg(struct saa7164_dev *dev, tmComResInfo_t* m, void *buf)
+void saa7164_bus_dumpmsg(struct saa7164_dev *dev, struct tmComResInfo* m, void *buf)
 {
        dprintk(DBGLVL_BUS, "Dumping msg structure:\n");
        dprintk(DBGLVL_BUS, " .id               = %d\n",   m->id);
@@ -121,7 +121,7 @@ void saa7164_bus_dumpmsg(struct saa7164_dev *dev, tmComResInfo_t* m, void *buf)
 /*
  * Places a command or a response on the bus. The implementation does not
  * know if it is a command or a response it just places the data on the
- * bus depending on the bus information given in the tmComResBusInfo_t
+ * bus depending on the bus information given in the struct tmComResBusInfo
  * structure. If the command or response does not fit into the bus ring
  * buffer it will be refused.
  *
@@ -129,9 +129,9 @@ void saa7164_bus_dumpmsg(struct saa7164_dev *dev, tmComResInfo_t* m, void *buf)
  *  SAA_OK     The function executed successfully.
  *  < 0        One or more members are not initialized.
  */
-int saa7164_bus_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf)
+int saa7164_bus_set(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf)
 {
-       tmComResBusInfo_t *bus = &dev->bus;
+       struct tmComResBusInfo *bus = &dev->bus;
        u32 bytes_to_write, free_write_space, timeout, curr_srp, curr_swp;
        u32 new_swp, space_rem;
        int ret = SAA_ERR_BAD_PARAMETER;
@@ -294,19 +294,19 @@ out:
 /*
  * Receive a command or a response from the bus. The implementation does not
  * know if it is a command or a response it simply dequeues the data,
- * depending on the bus information given in the tmComResBusInfo_t structure.
+ * depending on the bus information given in the struct tmComResBusInfo structure.
  *
  * Return Value:
  *  0          The function executed successfully.
  *  < 0        One or more members are not initialized.
  */
-int saa7164_bus_get(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf,
+int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf,
        int peekonly)
 {
-       tmComResBusInfo_t *bus = &dev->bus;
+       struct tmComResBusInfo *bus = &dev->bus;
        u32 bytes_to_read, write_distance, curr_grp, curr_gwp,
                new_grp, buf_size, space_rem;
-       tmComResInfo_t msg_tmp;
+       struct tmComResInfo msg_tmp;
        int ret = SAA_ERR_BAD_PARAMETER;
 
        saa7164_bus_verify(dev);
index e4ec44f5c7cccd46d73b0023e4f4d50ff5fe36af..301a9e302f452ca33bd25680505f0975bf884b09 100644 (file)
@@ -92,7 +92,7 @@ int saa7164_irq_dequeue(struct saa7164_dev *dev)
        do {
 
                /* Peek the msg bus */
-               tmComResInfo_t tRsp = { 0, 0, 0, 0, 0, 0 };
+               struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 };
                ret = saa7164_bus_get(dev, &tRsp, NULL, 1);
                if (ret != SAA_OK)
                        break;
@@ -143,7 +143,7 @@ int saa7164_cmd_dequeue(struct saa7164_dev *dev)
 
        while (loop) {
 
-               tmComResInfo_t tRsp = { 0, 0, 0, 0, 0, 0 };
+               struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 };
                ret = saa7164_bus_get(dev, &tRsp, NULL, 1);
                if (ret == SAA_ERR_EMPTY)
                        return SAA_OK;
@@ -186,9 +186,9 @@ int saa7164_cmd_dequeue(struct saa7164_dev *dev)
        return SAA_OK;
 }
 
-int saa7164_cmd_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf)
+int saa7164_cmd_set(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf)
 {
-       tmComResBusInfo_t *bus = &dev->bus;
+       struct tmComResBusInfo *bus = &dev->bus;
        u8 cmd_sent;
        u16 size, idx;
        u32 cmds;
@@ -339,11 +339,11 @@ void saa7164_cmd_signal(struct saa7164_dev *dev, u8 seqno)
        mutex_unlock(&dev->lock);
 }
 
-int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, tmComResCmd_t command,
+int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, enum tmComResCmd command,
        u16 controlselector, u16 size, void *buf)
 {
-       tmComResInfo_t command_t, *pcommand_t;
-       tmComResInfo_t response_t, *presponse_t;
+       struct tmComResInfo command_t, *pcommand_t;
+       struct tmComResInfo response_t, *presponse_t;
        u8 errdata[256];
        u16 resp_dsize;
        u16 data_recd;
index 903d880d63f468eff357b3bebf93f8a7ad0b82d6..46c2fb2ecf5e81c24353457cf793726ffd4d67bd 100644 (file)
@@ -825,8 +825,8 @@ void saa7164_dumpregs(struct saa7164_dev *dev, u32 addr)
 
 static void saa7164_dump_hwdesc(struct saa7164_dev *dev)
 {
-       dprintk(1, "@0x%p hwdesc sizeof(tmComResHWDescr_t) = %d bytes\n",
-               &dev->hwdesc, (u32)sizeof(tmComResHWDescr_t));
+       dprintk(1, "@0x%p hwdesc sizeof(struct tmComResHWDescr) = %d bytes\n",
+               &dev->hwdesc, (u32)sizeof(struct tmComResHWDescr));
 
        dprintk(1, " .bLength = 0x%x\n", dev->hwdesc.bLength);
        dprintk(1, " .bDescriptorType = 0x%x\n", dev->hwdesc.bDescriptorType);
@@ -856,8 +856,8 @@ static void saa7164_dump_hwdesc(struct saa7164_dev *dev)
 static void saa7164_dump_intfdesc(struct saa7164_dev *dev)
 {
        dprintk(1, "@0x%p intfdesc "
-               "sizeof(tmComResInterfaceDescr_t) = %d bytes\n",
-               &dev->intfdesc, (u32)sizeof(tmComResInterfaceDescr_t));
+               "sizeof(struct tmComResInterfaceDescr) = %d bytes\n",
+               &dev->intfdesc, (u32)sizeof(struct tmComResInterfaceDescr));
 
        dprintk(1, " .bLength = 0x%x\n", dev->intfdesc.bLength);
        dprintk(1, " .bDescriptorType = 0x%x\n", dev->intfdesc.bDescriptorType);
@@ -877,8 +877,8 @@ static void saa7164_dump_intfdesc(struct saa7164_dev *dev)
 
 static void saa7164_dump_busdesc(struct saa7164_dev *dev)
 {
-       dprintk(1, "@0x%p busdesc sizeof(tmComResBusDescr_t) = %d bytes\n",
-               &dev->busdesc, (u32)sizeof(tmComResBusDescr_t));
+       dprintk(1, "@0x%p busdesc sizeof(struct tmComResBusDescr) = %d bytes\n",
+               &dev->busdesc, (u32)sizeof(struct tmComResBusDescr));
 
        dprintk(1, " .CommandRing   = 0x%016Lx\n", dev->busdesc.CommandRing);
        dprintk(1, " .ResponseRing  = 0x%016Lx\n", dev->busdesc.ResponseRing);
@@ -895,23 +895,23 @@ static void saa7164_dump_busdesc(struct saa7164_dev *dev)
  */
 static void saa7164_get_descriptors(struct saa7164_dev *dev)
 {
-       memcpy_fromio(&dev->hwdesc, dev->bmmio, sizeof(tmComResHWDescr_t));
-       memcpy_fromio(&dev->intfdesc, dev->bmmio + sizeof(tmComResHWDescr_t),
-               sizeof(tmComResInterfaceDescr_t));
+       memcpy_fromio(&dev->hwdesc, dev->bmmio, sizeof(struct tmComResHWDescr));
+       memcpy_fromio(&dev->intfdesc, dev->bmmio + sizeof(struct tmComResHWDescr),
+               sizeof(struct tmComResInterfaceDescr));
        memcpy_fromio(&dev->busdesc, dev->bmmio + dev->intfdesc.BARLocation,
-               sizeof(tmComResBusDescr_t));
+               sizeof(struct tmComResBusDescr));
 
-       if (dev->hwdesc.bLength != sizeof(tmComResHWDescr_t)) {
-               printk(KERN_ERR "Structure tmComResHWDescr_t is mangled\n");
+       if (dev->hwdesc.bLength != sizeof(struct tmComResHWDescr)) {
+               printk(KERN_ERR "Structure struct tmComResHWDescr is mangled\n");
                printk(KERN_ERR "Need %x got %d\n", dev->hwdesc.bLength,
-                       (u32)sizeof(tmComResHWDescr_t));
+                       (u32)sizeof(struct tmComResHWDescr));
        } else
                saa7164_dump_hwdesc(dev);
 
-       if (dev->intfdesc.bLength != sizeof(tmComResInterfaceDescr_t)) {
-               printk(KERN_ERR "struct tmComResInterfaceDescr_t is mangled\n");
+       if (dev->intfdesc.bLength != sizeof(struct tmComResInterfaceDescr)) {
+               printk(KERN_ERR "struct struct tmComResInterfaceDescr is mangled\n");
                printk(KERN_ERR "Need %x got %d\n", dev->intfdesc.bLength,
-                       (u32)sizeof(tmComResInterfaceDescr_t));
+                       (u32)sizeof(struct tmComResInterfaceDescr));
        } else
                saa7164_dump_intfdesc(dev);
 
@@ -1101,7 +1101,7 @@ static void saa7164_dev_unregister(struct saa7164_dev *dev)
 static int saa7164_proc_show(struct seq_file *m, void *v)
 {
        struct saa7164_dev *dev;
-       tmComResBusInfo_t *b;
+       struct tmComResBusInfo *b;
        struct list_head *list;
        int i, c;
 
@@ -1191,7 +1191,7 @@ static int saa7164_proc_create(void)
 static int saa7164_thread_function(void *data)
 {
        struct saa7164_dev *dev = data;
-       tmFwInfoStruct_t fwinfo;
+       struct tmFwInfoStruct fwinfo;
        u64 last_poll_time = 0;
 
        dprintk(DBGLVL_THR, "thread started\n");
index 6cf723a5753ffa008d4b92b08f86ad7add4d68ec..28cf223e571f00c222acb8107479663426e989f5 100644 (file)
@@ -119,7 +119,7 @@ static int saa7164_encoder_buffers_alloc(struct saa7164_port *port)
        struct saa7164_dev *dev = port->dev;
        struct saa7164_buffer *buf;
        struct saa7164_user_buffer *ubuf;
-       tmHWStreamParameters_t *params = &port->hw_streamingparams;
+       struct tmHWStreamParameters *params = &port->hw_streamingparams;
        int result = -ENODEV, i;
        int len = 0;
 
index e66c29d6ead33a600a3fca6d1ee2ff886c6d3070..9690d44ec34fa9fd5c5be465f2566ccef4ae0735 100644 (file)
@@ -24,7 +24,7 @@
 /* Some structues are passed directly to/from the firmware and
  * have strict alignment requirements. This is one of them.
  */
-typedef struct {
+struct tmComResHWDescr {
        u8      bLength;
        u8      bDescriptorType;
        u8      bDescriptorSubtype;
@@ -37,14 +37,14 @@ typedef struct {
        u32     dwHostMemoryRegionSize;
        u32     dwHostHibernatMemRegion;
        u32     dwHostHibernatMemRegionSize;
-} __attribute__((packed)) tmComResHWDescr_t;
+} __attribute__((packed));
 
 /* This is DWORD aligned on windows but I can't find the right
  * gcc syntax to match the binary data from the device.
  * I've manually padded with Reserved[3] bytes to match the hardware,
  * but this could break if GCC decies to pack in a different way.
  */
-typedef struct {
+struct tmComResInterfaceDescr {
        u8      bLength;
        u8      bDescriptorType;
        u8      bDescriptorSubtype;
@@ -56,27 +56,27 @@ typedef struct {
        u8      bDebugInterruptId;
        u8      BARLocation;
        u8      Reserved[3];
-} tmComResInterfaceDescr_t;
+};
 
-typedef struct {
+struct tmComResBusDescr {
        u64     CommandRing;
        u64     ResponseRing;
        u32     CommandWrite;
        u32     CommandRead;
        u32     ResponseWrite;
        u32     ResponseRead;
-} tmComResBusDescr_t;
+};
 
-typedef enum {
+enum tmBusType {
        NONE            = 0,
        TYPE_BUS_PCI    = 1,
        TYPE_BUS_PCIe   = 2,
        TYPE_BUS_USB    = 3,
        TYPE_BUS_I2C    = 4
-} tmBusType_t;
+};
 
-typedef struct {
-       tmBusType_t Type;
+struct tmComResBusInfo {
+       enum tmBusType Type;
        u16     m_wMaxReqSize;
        u8      *m_pdwSetRing;
        u32     m_dwSizeSetRing;
@@ -90,18 +90,18 @@ typedef struct {
        /* All access is protected */
        struct mutex lock;
 
-} tmComResBusInfo_t;
+};
 
-typedef struct {
+struct tmComResInfo {
        u8      id;
        u8      flags;
        u16     size;
        u32     command;
        u16     controlselector;
        u8      seqno;
-} __attribute__((packed)) tmComResInfo_t;
+} __attribute__((packed));
 
-typedef enum {
+enum tmComResCmd {
        SET_CUR  = 0x01,
        GET_CUR  = 0x81,
        GET_MIN  = 0x82,
@@ -110,7 +110,7 @@ typedef enum {
        GET_LEN  = 0x85,
        GET_INFO = 0x86,
        GET_DEF  = 0x87
-} tmComResCmd_t;
+};
 
 struct cmd {
        u8 seqno;
@@ -121,20 +121,20 @@ struct cmd {
        wait_queue_head_t wait;
 };
 
-typedef struct {
+struct tmDescriptor {
        u32     pathid;
        u32     size;
        void    *descriptor;
-} tmDescriptor_t;
+};
 
-typedef struct {
+struct tmComResDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
        u8      unitid;
-} __attribute__((packed)) tmComResDescrHeader_t;
+} __attribute__((packed));
 
-typedef struct {
+struct tmComResExtDevDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
@@ -144,22 +144,22 @@ typedef struct {
        u32     numgpiopins;
        u8      numgpiogroups;
        u8      controlsize;
-} __attribute__((packed)) tmComResExtDevDescrHeader_t;
+} __attribute__((packed));
 
-typedef struct {
+struct tmComResGPIO {
        u32     pin;
        u8      state;
-} __attribute__((packed)) tmComResGPIO_t;
+} __attribute__((packed));
 
-typedef struct {
+struct tmComResPathDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
        u8      pathid;
-} __attribute__((packed)) tmComResPathDescrHeader_t;
+} __attribute__((packed));
 
 /* terminaltype */
-typedef enum {
+enum tmComResTermType {
        ITT_ANTENNA              = 0x0203,
        LINE_CONNECTOR           = 0x0603,
        SPDIF_CONNECTOR          = 0x0605,
@@ -167,9 +167,9 @@ typedef enum {
        SVIDEO_CONNECTOR         = 0x0402,
        COMPONENT_CONNECTOR      = 0x0403,
        STANDARD_DMA             = 0xF101
-} tmComResTermType_t;
+};
 
-typedef struct {
+struct tmComResAntTermDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
@@ -178,9 +178,9 @@ typedef struct {
        u8      assocterminal;
        u8      iterminal;
        u8      controlsize;
-} __attribute__((packed)) tmComResAntTermDescrHeader_t;
+} __attribute__((packed));
 
-typedef struct {
+struct tmComResTunerDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
@@ -190,9 +190,9 @@ typedef struct {
        u32     tuningstandards;
        u8      controlsize;
        u32     controls;
-} __attribute__((packed)) tmComResTunerDescrHeader_t;
+} __attribute__((packed));
 
-typedef enum {
+enum tmBufferFlag {
        /* the buffer does not contain any valid data */
        TM_BUFFER_FLAG_EMPTY,
 
@@ -201,23 +201,23 @@ typedef enum {
 
        /* the buffer is the dummy buffer - TODO??? */
        TM_BUFFER_FLAG_DUMMY_BUFFER
-} tmBufferFlag_t;
+};
 
-typedef struct {
+struct tmBuffer {
        u64             *pagetablevirt;
        u64             pagetablephys;
        u16             offset;
        u8              *context;
        u64             timestamp;
-       tmBufferFlag_t  BufferFlag_t;
+       enum tmBufferFlag BufferFlag;
        u32             lostbuffers;
        u32             validbuffers;
        u64             *dummypagevirt;
        u64             dummypagephys;
        u64             *addressvirt;
-} tmBuffer_t;
+};
 
-typedef struct {
+struct tmHWStreamParameters {
        u32     bitspersample;
        u32     samplesperline;
        u32     numberoflines;
@@ -227,15 +227,15 @@ typedef struct {
        u64     *pagetablelistphys;
        u32     numpagetables;
        u32     numpagetableentries;
-} tmHWStreamParameters_t;
+};
 
-typedef struct {
-       tmHWStreamParameters_t          HWStreamParameters_t;
+struct tmStreamParameters {
+       struct tmHWStreamParameters     HWStreamParameters;
        u64                             qwDummyPageTablePhys;
        u64                             *pDummyPageTableVirt;
-} tmStreamParameters_t;
+};
 
-typedef struct {
+struct tmComResDMATermDescrHeader {
        u8      len;
        u8      type;
        u8      subtyle;
@@ -251,7 +251,7 @@ typedef struct {
        u8      metadatasize;
        u8      numformats;
        u8      controlsize;
-} __attribute__((packed)) tmComResDMATermDescrHeader_t;
+} __attribute__((packed));
 
 /*
  *
@@ -274,7 +274,7 @@ typedef struct {
  *                            Data is to be ignored by the application.
  *
  */
-typedef struct {
+struct tmComResTSFormatDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
@@ -283,24 +283,22 @@ typedef struct {
        u8      bPacketLength;
        u8      bStrideLength;
        u8      guidStrideFormat[16];
-} __attribute__((packed)) tmComResTSFormatDescrHeader_t;
+} __attribute__((packed));
 
 /* Encoder related structures */
 
 /* A/V Mux Selector */
-typedef struct
-{
+struct tmComResSelDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
        u8      unitid;
        u8      nrinpins;
        u8      sourceid;
-} __attribute__((packed)) tmComResSelDescrHeader_t;
+} __attribute__((packed));
 
 /* A/V Audio processor definitions */
-typedef struct
-{
+struct tmComResProcDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
@@ -308,25 +306,23 @@ typedef struct
        u8      sourceid;
        u16     wreserved;
        u8      controlsize;
-} __attribute__((packed)) tmComResProcDescrHeader_t;
+} __attribute__((packed));
 
 /* Video bitrate control message */
 #define EU_VIDEO_BIT_RATE_MODE_CONSTANT                (0)
 #define EU_VIDEO_BIT_RATE_MODE_VARIABLE_AVERAGE (1)
 #define EU_VIDEO_BIT_RATE_MODE_VARIABLE_PEAK   (2)
-typedef struct
-{
+struct tmComResEncVideoBitRate {
        u8      ucVideoBitRateMode;
        u32     dwVideoBitRate;
        u32     dwVideoBitRatePeak;
-} __attribute__((packed)) tmComResEncVideoBitRate_t;
+} __attribute__((packed));
 
 /* Video Encoder Aspect Ratio message */
-typedef struct
-{
+struct tmComResEncVideoInputAspectRatio {
        u8      width;
        u8      height;
-} __attribute__((packed)) tmComResEncVideoInputAspectRatio_t;
+} __attribute__((packed));
 
 /* Video Encoder GOP IBP message */
 /* 1. IPPPPPPPPPPPPPP */
@@ -334,15 +330,13 @@ typedef struct
 /* 3. IBBPBBPBBPBBP   */
 #define SAA7164_ENCODER_DEFAULT_GOP_DIST ( 1)
 #define SAA7164_ENCODER_DEFAULT_GOP_SIZE (15)
-typedef struct
-{
+struct tmComResEncVideoGopStructure {
        u8      ucGOPSize;      /* GOP Size 12, 15 */
        u8      ucRefFrameDist; /* Reference Frame Distance */
-} __attribute__((packed)) tmComResEncVideoGopStructure_t;
+} __attribute__((packed));
 
 /* Encoder processor definition */
-typedef struct
-{
+struct tmComResEncoderDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
@@ -358,53 +352,47 @@ typedef struct
        u16     wmVidFrmRateCap;
        u32     dwmAudFormatCap;
        u8      bmAudBitrateCap;
-} __attribute__((packed)) tmComResEncoderDescrHeader_t;
+} __attribute__((packed));
 
 /* Audio processor definition */
-typedef struct
-{
+struct tmComResAFeatureDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
        u8      unitid;
        u8      sourceid;
        u8      controlsize;
-} __attribute__((packed)) tmComResAFeatureDescrHeader_t;
+} __attribute__((packed));
 
 /* Audio control messages */
-typedef struct
-{
+struct tmComResAudioDefaults {
        u8      ucDecoderLevel;
        u8      ucDecoderFM_Level;
        u8      ucMonoLevel;
        u8      ucNICAM_Level;
        u8      ucSAP_Level;
        u8      ucADC_Level;
-} __attribute__((packed)) tmComResAudioDefaults_t;
+} __attribute__((packed));
 
 /* Audio bitrate control message */
-typedef struct
-{
+struct tmComResEncAudioBitRate {
        u8      ucAudioBitRateMode;
        u32     dwAudioBitRate;
        u32     dwAudioBitRatePeak;
-} __attribute__((packed)) tmComResEncAudioBitRate_t;
+} __attribute__((packed));
 
 /* Tuner / AV Decoder messages */
-typedef struct
-{
+struct tmComResTunerStandard {
        u8      std;
        u32     country;
-} __attribute__((packed)) tmComResTunerStandard_t;
+} __attribute__((packed));
 
-typedef struct
-{
+struct tmComResTunerStandardAuto {
        u8      mode;
-} __attribute__((packed)) tmComResTunerStandardAuto_t;
+} __attribute__((packed));
 
 /* EEPROM definition for PS stream types */
-typedef struct
-{
+struct tmComResPSFormatDescrHeader {
        u8      len;
        u8      type;
        u8      subtype;
@@ -412,11 +400,10 @@ typedef struct
        u16     wPacketLength;
        u16     wPackLength;
        u8      bPackDataType;
-} __attribute__((packed)) tmComResPSFormatDescrHeader_t;
+} __attribute__((packed));
 
 /* VBI control structure */
-typedef struct
-{
+struct tmComResVBIFormatDescrHeader {
        u8      len;
        u8      type;
        u8      subtype; /* VS_FORMAT_VBI */
@@ -426,28 +413,24 @@ typedef struct
        u8      EndLine; /* NTSC = 21 */
        u8      FieldRate; /* 60 for NTSC */
        u8      bNumLines; /* Unsed - scheduled for removal */
-} __attribute__((packed)) tmComResVBIFormatDescrHeader_t;
+} __attribute__((packed));
 
-typedef struct
-{
+struct tmComResProbeCommit {
        u16     bmHint;
        u8      bFormatIndex;
        u8      bFrameIndex;
-} __attribute__((packed)) tmComResProbeCommit_t;
+} __attribute__((packed));
 
-typedef struct
-{
+struct tmComResDebugSetLevel {
        u32     dwDebugLevel;
-} __attribute__((packed)) tmComResDebugSetLevel_t;
+} __attribute__((packed));
 
-typedef struct
-{
+struct tmComResDebugGetData {
        u32     dwResult;
        u8      ucDebugData[256];
-} __attribute__((packed)) tmComResDebugGetData_t;
+} __attribute__((packed));
 
-typedef struct
-{
+struct tmFwInfoStruct {
        u32     status;
        u32     mode;
        u32     devicespec;
@@ -456,5 +439,4 @@ typedef struct
        u32     RemainHeap;
        u32     CPUClock;
        u32     RAMSpeed;
-} __attribute__((packed)) tmFwInfoStruct_t;
-
+} __attribute__((packed));
index f6211c91b88ef665ec80efa62147974ad18ae09c..6f6ea52a48b163a37b4a550816829e852c534b42 100644 (file)
@@ -102,7 +102,7 @@ static int saa7164_vbi_buffers_alloc(struct saa7164_port *port)
        struct saa7164_dev *dev = port->dev;
        struct saa7164_buffer *buf;
        struct saa7164_user_buffer *ubuf;
-       tmHWStreamParameters_t *params = &port->hw_streamingparams;
+       struct tmHWStreamParameters *params = &port->hw_streamingparams;
        int result = -ENODEV, i;
        int len = 0;
 
index 5ff79ab04405bc8937a7080f9fda6c4f53989c38..99eb94254a1a10cab04aa65f2fbb680739893ca4 100644 (file)
@@ -343,10 +343,10 @@ struct saa7164_port {
        /* --- Generic port attributes --- */
 
        /* HW stream parameters */
-       tmHWStreamParameters_t hw_streamingparams;
+       struct tmHWStreamParameters hw_streamingparams;
 
        /* DMA configuration values, is seeded during initialization */
-       tmComResDMATermDescrHeader_t hwcfg;
+       struct tmComResDMATermDescrHeader hwcfg;
 
        /* hardware specific registers */
        u32 bufcounter;
@@ -400,11 +400,11 @@ struct saa7164_port {
        u16 ctl_sharpness;
        s8 ctl_volume;
 
-       tmComResAFeatureDescrHeader_t audfeat;
-       tmComResEncoderDescrHeader_t encunit;
-       tmComResProcDescrHeader_t vidproc;
-       tmComResExtDevDescrHeader_t ifunit;
-       tmComResTunerDescrHeader_t tunerunit;
+       struct tmComResAFeatureDescrHeader audfeat;
+       struct tmComResEncoderDescrHeader encunit;
+       struct tmComResProcDescrHeader vidproc;
+       struct tmComResExtDevDescrHeader ifunit;
+       struct tmComResTunerDescrHeader tunerunit;
 
        struct work_struct workenc;
 
@@ -418,7 +418,7 @@ struct saa7164_port {
        wait_queue_head_t wait_read;
 
        /* V4L VBI */
-       tmComResVBIFormatDescrHeader_t vbi_fmt_ntsc;
+       struct tmComResVBIFormatDescrHeader vbi_fmt_ntsc;
        struct saa7164_vbi_params vbi_params;
 
        /* Debug */
@@ -454,11 +454,11 @@ struct saa7164_dev {
        struct saa7164_fw_status        fw_status;
        u32                             firmwareloaded;
 
-       tmComResHWDescr_t               hwdesc;
-       tmComResInterfaceDescr_t        intfdesc;
-       tmComResBusDescr_t              busdesc;
+       struct tmComResHWDescr          hwdesc;
+       struct tmComResInterfaceDescr   intfdesc;
+       struct tmComResBusDescr         busdesc;
 
-       tmComResBusInfo_t               bus;
+       struct tmComResBusInfo          bus;
 
        /* Interrupt status and ack registers */
        u32 int_status;
@@ -511,14 +511,14 @@ extern void saa7164_call_i2c_clients(struct saa7164_i2c *bus,
 /* saa7164-bus.c                                               */
 int saa7164_bus_setup(struct saa7164_dev *dev);
 void saa7164_bus_dump(struct saa7164_dev *dev);
-int saa7164_bus_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf);
-int saa7164_bus_get(struct saa7164_dev *dev, tmComResInfo_t* msg,
+int saa7164_bus_set(struct saa7164_dev *dev, struct tmComResInfo* msg, void *buf);
+int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg,
        void *buf, int peekonly);
 
 /* ----------------------------------------------------------- */
 /* saa7164-cmd.c                                               */
 int saa7164_cmd_send(struct saa7164_dev *dev,
-       u8 id, tmComResCmd_t command, u16 controlselector,
+       u8 id, enum tmComResCmd command, u16 controlselector,
        u16 size, void *buf);
 void saa7164_cmd_signal(struct saa7164_dev *dev, u8 seqno);
 int saa7164_irq_dequeue(struct saa7164_dev *dev);
@@ -553,7 +553,7 @@ int saa7164_api_get_videomux(struct saa7164_port *port);
 int saa7164_api_set_vbi_format(struct saa7164_port *port);
 int saa7164_api_set_debug(struct saa7164_dev *dev, u8 level);
 int saa7164_api_collect_debug(struct saa7164_dev *dev);
-int saa7164_api_get_load_info(struct saa7164_dev *dev, tmFwInfoStruct_t *i);
+int saa7164_api_get_load_info(struct saa7164_dev *dev, struct tmFwInfoStruct *i);
 
 /* ----------------------------------------------------------- */
 /* saa7164-cards.c                                             */