Skip to content

Commit

Permalink
staging: ft1000: get rid of typedef usage.
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Marek Belisko authored and Greg Kroah-Hartman committed Oct 12, 2010
1 parent 4aee92f commit 13da8f0
Showing 1 changed file with 10 additions and 32 deletions.
42 changes: 10 additions & 32 deletions drivers/staging/ft1000/ft1000-usb/ft1000_download.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,7 @@
#define DWNLD_MAG1_SIZE_LOC 0x02
#define DWNLD_MAG1_PS_HDR_LOC 0x03

#pragma pack (push, pack_save, 1)
typedef struct _DSP_FILE_HDR {
long build_date;
long dsp_coff_date;
long loader_code_address;
long loader_code_size;
long loader_code_end;
long dsp_code_address;
long dsp_code_size;
long dsp_code_end;
long reserved[8];
} DSP_FILE_HDR, *PDSP_FILE_HDR;

typedef struct _DSP_FILE_HDR_5 {
struct dsp_file_hdr {
long version_id; // Version ID of this image format.
long package_id; // Package ID of code release.
long build_date; // Date/time stamp when file was built.
Expand All @@ -110,18 +97,10 @@ typedef struct _DSP_FILE_HDR_5 {
long version_data_offset; // Offset were scrambled version data begins.
long version_data_size; // Size, in words, of scrambled version data.
long nDspImages; // Number of DSP images in file.
} DSP_FILE_HDR_5, * PDSP_FILE_HDR_5;
};

typedef struct _DSP_IMAGE_INFO {
long coff_date; // Date/time when DSP Coff image was built.
long begin_offset; // Offset in file where image begins.
long end_offset; // Offset in file where image begins.
long run_address; // On chip Start address of DSP code.
long image_size; // Size of image.
long version; // Embedded version # of DSP code.
} DSP_IMAGE_INFO, *PDSP_IMAGE_INFO;

typedef struct _DSP_IMAGE_INFO_V6 {
#pragma pack(1)
struct dsp_image_info {
long coff_date; // Date/time when DSP Coff image was built.
long begin_offset; // Offset in file where image begins.
long end_offset; // Offset in file where image begins.
Expand All @@ -130,7 +109,8 @@ typedef struct _DSP_IMAGE_INFO_V6 {
long version; // Embedded version # of DSP code.
unsigned short checksum; // DSP File checksum
unsigned short pad1;
} DSP_IMAGE_INFO_V6, *PDSP_IMAGE_INFO_V6;
};


//---------------------------------------------------------------------------
// Function: check_usb_db
Expand Down Expand Up @@ -867,14 +847,13 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
PPSEUDO_HDR pHdr;
USHORT usHdrLength;
//PPROV_RECORD pProvRecord;
PDSP_FILE_HDR pFileHdr;
long word_length;
USHORT request;
USHORT temp;
USHORT tempword;

PDSP_FILE_HDR_5 pFileHdr5;
PDSP_IMAGE_INFO_V6 pDspImageInfoV6 = NULL;
struct dsp_file_hdr *pFileHdr5;
struct dsp_image_info *pDspImageInfoV6 = NULL;
long requested_version;
BOOLEAN bGoodVersion;
PDRVMSG pMailBoxData;
Expand Down Expand Up @@ -907,8 +886,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe

uiState = STATE_START_DWNLD;

pFileHdr = (PDSP_FILE_HDR)pFileStart;
pFileHdr5 = (PDSP_FILE_HDR_5)pFileStart;
pFileHdr5 = (struct dsp_file_hdr *)pFileStart;

ft1000_write_register (ft1000dev, 0x800, FT1000_REG_MAG_WATERMARK);

Expand Down Expand Up @@ -1203,7 +1181,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
bGoodVersion = FALSE;
requested_version = get_request_value(ft1000dev);

pDspImageInfoV6 = (PDSP_IMAGE_INFO_V6)(pFileStart + sizeof(DSP_FILE_HDR_5));
pDspImageInfoV6 = (struct dsp_image_info *)(pFileStart + sizeof(struct dsp_file_hdr ));

for (imageN = 0; imageN < pFileHdr5->nDspImages; imageN++)
{
Expand Down

0 comments on commit 13da8f0

Please sign in to comment.