From: Monam Agarwal Date: Tue, 18 Mar 2014 19:35:16 +0000 (+0530) Subject: Staging: ced1401: Fix no new typedef warning in ced_ioctl.h X-Git-Tag: MMI-PSA29.97-13-9~12500^2~88 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=431cd0e5cb36e227c53eb3c81bacec4a4b365662;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c index 85ab6a34f9ec..ebbc5090f219 100644 --- a/drivers/staging/ced1401/ced_ioc.c +++ b/drivers/staging/ced1401/ced_ioc.c @@ -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))) diff --git a/drivers/staging/ced1401/ced_ioctl.h b/drivers/staging/ced1401/ced_ioctl.h index 12294636392f..4b6c9dedb21e 100644 --- a/drivers/staging/ced1401/ced_ioctl.h +++ b/drivers/staging/ced1401/ced_ioctl.h @@ -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); } diff --git a/drivers/staging/ced1401/usb1401.c b/drivers/staging/ced1401/usb1401.c index db149aef0446..284abc08922c 100644 --- a/drivers/staging/ced1401/usb1401.c +++ b/drivers/staging/ced1401/usb1401.c @@ -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); diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h index 4bdd2e09ed0a..ea0fe6398a01 100644 --- a/drivers/staging/ced1401/usb1401.h +++ b/drivers/staging/ced1401/usb1401.h @@ -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);