mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
Staging: ced1401: Fix no new typedef warning in ced_ioctl.h
This patch fixes following checkpatch.pl warnings: WARNING:do not add new typedefs.All the related files have been modified. Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5f3ccfcf2c
commit
431cd0e5cb
@ -779,10 +779,10 @@ int UnsetTransfer(DEVICE_EXTENSION *pdx, int nArea)
|
||||
** pretend that whatever the user asked for was achieved, so we return 1 if
|
||||
** try to create one, and 0 if they ask to remove (assuming all else was OK).
|
||||
****************************************************************************/
|
||||
int SetEvent(DEVICE_EXTENSION *pdx, TRANSFEREVENT __user *pTE)
|
||||
int SetEvent(DEVICE_EXTENSION *pdx, struct transfer_event __user *pTE)
|
||||
{
|
||||
int iReturn = U14ERR_NOERROR;
|
||||
TRANSFEREVENT te;
|
||||
struct transfer_event te;
|
||||
|
||||
/* get a local copy of the data */
|
||||
if (copy_from_user(&te, pTE, sizeof(te)))
|
||||
|
@ -34,13 +34,13 @@ struct transfer_area_desc {
|
||||
};
|
||||
|
||||
|
||||
typedef struct TransferEvent {
|
||||
struct transfer_event {
|
||||
unsigned int dwStart; /* offset into the area */
|
||||
unsigned int dwLength; /* length of the region */
|
||||
unsigned short wAreaNum; /* the area number */
|
||||
unsigned short wFlags; /* bit 0 set for toHost */
|
||||
int iSetEvent; /* could be dummy in LINUX */
|
||||
} TRANSFEREVENT;
|
||||
};
|
||||
|
||||
#define MAX_TRANSFER_SIZE 0x4000 /* Maximum data bytes per IRP */
|
||||
#define MAX_AREA_LENGTH 0x100000 /* Maximum size of transfer area */
|
||||
@ -93,7 +93,7 @@ typedef struct TCSBlock {
|
||||
|
||||
#define IOCTL_CED_SETTRANSFER _IOW(CED_MAGIC_IOC, 11, struct transfer_area_desc)
|
||||
#define IOCTL_CED_UNSETTRANSFER _IO(CED_MAGIC_IOC, 12)
|
||||
#define IOCTL_CED_SETEVENT _IOW(CED_MAGIC_IOC, 13, TRANSFEREVENT)
|
||||
#define IOCTL_CED_SETEVENT _IOW(CED_MAGIC_IOC, 13, struct transfer_event)
|
||||
#define IOCTL_CED_GETOUTBUFSPACE _IO(CED_MAGIC_IOC, 14)
|
||||
#define IOCTL_CED_GETBASEADDRESS _IO(CED_MAGIC_IOC, 15)
|
||||
#define IOCTL_CED_GETDRIVERREVISION _IO(CED_MAGIC_IOC, 16)
|
||||
@ -199,7 +199,7 @@ inline int CED_UnsetTransfer(int fh, int nArea)
|
||||
return ioctl(fh, IOCTL_CED_UNSETTRANSFER, nArea);
|
||||
}
|
||||
|
||||
inline int CED_SetEvent(int fh, TRANSFEREVENT *pTE)
|
||||
inline int CED_SetEvent(int fh, struct transfer_event *pTE)
|
||||
{
|
||||
return ioctl(fh, IOCTL_CED_SETEVENT, pTE);
|
||||
}
|
||||
|
@ -1257,7 +1257,7 @@ static long ced_ioctl(struct file *file, unsigned int cmd, unsigned long ulArg)
|
||||
return UnsetTransfer(pdx, (int)ulArg);
|
||||
|
||||
case _IOC_NR(IOCTL_CED_SETEVENT):
|
||||
return SetEvent(pdx, (TRANSFEREVENT __user *) ulArg);
|
||||
return SetEvent(pdx, (struct transfer_event __user *) ulArg);
|
||||
|
||||
case _IOC_NR(IOCTL_CED_GETOUTBUFSPACE):
|
||||
return GetOutBufSpace(pdx);
|
||||
|
@ -220,7 +220,7 @@ extern int GetChar(DEVICE_EXTENSION *pdx);
|
||||
extern int GetString(DEVICE_EXTENSION *pdx, char __user *pUser, int n);
|
||||
extern int SetTransfer(DEVICE_EXTENSION *pdx, struct transfer_area_desc __user *pTD);
|
||||
extern int UnsetTransfer(DEVICE_EXTENSION *pdx, int nArea);
|
||||
extern int SetEvent(DEVICE_EXTENSION *pdx, TRANSFEREVENT __user *pTE);
|
||||
extern int SetEvent(DEVICE_EXTENSION *pdx, struct transfer_event __user *pTE);
|
||||
extern int Stat1401(DEVICE_EXTENSION *pdx);
|
||||
extern int LineCount(DEVICE_EXTENSION *pdx);
|
||||
extern int GetOutBufSpace(DEVICE_EXTENSION *pdx);
|
||||
|
Loading…
Reference in New Issue
Block a user