Commit 8be88040 authored by Johannes Schilling's avatar Johannes Schilling Committed by Greg Kroah-Hartman

keucr: remove some unneccesary typedefs

resolves checkpatch.pl warning "do not add new typedefs" and renames allcaps
structures.
Signed-off-by: default avatarLaura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: default avatarJohannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e543d2ea
......@@ -89,7 +89,7 @@ int ENE_SMInit(struct us_data *us)
return USB_STOR_TRANSPORT_ERROR;
}
us->SM_Status = *(PSM_STATUS)&buf[0];
us->SM_Status = *(struct keucr_sm_status *)&buf[0];
us->SM_DeviceID = buf[1];
us->SM_CardID = buf[2];
......
......@@ -168,7 +168,7 @@ SmartMedia Model & Attribute
/***************************************************************************
Struct Definition
***************************************************************************/
struct SSFDCTYPE {
struct keucr_media_info {
BYTE Model;
BYTE Attribute;
BYTE MaxZones;
......@@ -177,30 +177,14 @@ struct SSFDCTYPE {
WORD MaxLogBlocks;
};
typedef struct SSFDCTYPE_T {
BYTE Model;
BYTE Attribute;
BYTE MaxZones;
BYTE MaxSectors;
WORD MaxBlocks;
WORD MaxLogBlocks;
} *SSFDCTYPE_T;
struct ADDRESS {
struct keucr_media_address {
BYTE Zone; /* Zone Number */
BYTE Sector; /* Sector(512byte) Number on Block */
WORD PhyBlock; /* Physical Block Number on Zone */
WORD LogBlock; /* Logical Block Number of Zone */
};
typedef struct ADDRESS_T {
BYTE Zone; /* Zone Number */
BYTE Sector; /* Sector(512byte) Number on Block */
WORD PhyBlock; /* Physical Block Number on Zone */
WORD LogBlock; /* Logical Block Number of Zone */
} *ADDRESS_T;
struct CIS_AREA {
struct keucr_media_area {
BYTE Sector; /* Sector(512byte) Number on Block */
WORD PhyBlock; /* Physical Block Number on Zone 0 */
};
......@@ -215,9 +199,9 @@ extern WORD ReadBlock;
extern WORD WriteBlock;
extern DWORD MediaChange;
extern struct SSFDCTYPE Ssfdc;
extern struct ADDRESS Media;
extern struct CIS_AREA CisArea;
extern struct keucr_media_info Ssfdc;
extern struct keucr_media_address Media;
extern struct keucr_media_area CisArea;
/*
* SMILMain.c
......
......@@ -33,9 +33,9 @@ void _Set_D_ECCdata(BYTE, BYTE *);
void _Calc_D_ECCdata(BYTE *);
struct SSFDCTYPE Ssfdc;
struct ADDRESS Media;
struct CIS_AREA CisArea;
struct keucr_media_info Ssfdc;
struct keucr_media_address Media;
struct keucr_media_area CisArea;
static BYTE EccBuf[6];
extern PBYTE SMHostAddr;
......
......@@ -65,7 +65,7 @@ static int eucr_resume(struct usb_interface *iface)
us->Power_IsResum = true;
us->SM_Status = *(PSM_STATUS)&tmp;
us->SM_Status = *(struct keucr_sm_status *)&tmp;
return 0;
}
......@@ -87,7 +87,7 @@ static int eucr_reset_resume(struct usb_interface *iface)
us->Power_IsResum = true;
us->SM_Status = *(PSM_STATUS)&tmp;
us->SM_Status = *(struct keucr_sm_status *)&tmp;
return 0;
}
......
......@@ -51,7 +51,7 @@ struct us_unusual_dev {
#define FDIR_WRITE 0
#define FDIR_READ 1
typedef struct _SD_STATUS {
struct keucr_sd_status {
BYTE Insert:1;
BYTE Ready:1;
BYTE MediaChange:1;
......@@ -60,9 +60,9 @@ typedef struct _SD_STATUS {
BYTE HiSpeed:1;
BYTE WtP:1;
BYTE Reserved:1;
} SD_STATUS, *PSD_STATUS;
};
typedef struct _MS_STATUS {
struct keucr_ms_status {
BYTE Insert:1;
BYTE Ready:1;
BYTE MediaChange:1;
......@@ -71,16 +71,16 @@ typedef struct _MS_STATUS {
BYTE Reserved1:1;
BYTE WtP:1;
BYTE Reserved2:1;
} MS_STATUS, *PMS_STATUS;
};
typedef struct _SM_STATUS {
struct keucr_sm_status {
BYTE Insert:1;
BYTE Ready:1;
BYTE MediaChange:1;
BYTE Reserved:3;
BYTE WtP:1;
BYTE IsMS:1;
} SM_STATUS, *PSM_STATUS;
};
/* SD Block Length */
#define SD_BLOCK_LEN 9 /* 2^9 = 512 Bytes,
......@@ -178,9 +178,9 @@ struct us_data {
pm_hook suspend_resume_hook;
#endif
/* for 6250 code */
SD_STATUS SD_Status;
MS_STATUS MS_Status;
SM_STATUS SM_Status;
struct keucr_sd_status SD_Status;
struct keucr_ms_status MS_Status;
struct keucr_sm_status SM_Status;
/* ----- SD Control Data ---------------- */
/* SD_REGISTER SD_Regs; */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment