Skip to content

Commit

Permalink
Staging: ced1401: Fix no new typedef warning in ced_ioctl.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
MonamAgarwal authored and gregkh committed Mar 18, 2014
1 parent 5f3ccfc commit 431cd0e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/ced1401/ced_ioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/ced1401/ced_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/ced1401/usb1401.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/ced1401/usb1401.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 431cd0e

Please sign in to comment.