@@ -86,13 +86,13 @@ module_param_hw(mwave_3780i_io, int, ioport, 0);
8686module_param_hw (mwave_uart_irq , int , irq , 0 );
8787module_param_hw (mwave_uart_io , int , ioport , 0 );
8888
89- MWAVE_DEVICE_DATA mwave_s_mdd ;
89+ struct mwave_device_data mwave_s_mdd ;
9090
9191static long mwave_ioctl (struct file * file , unsigned int iocmd ,
9292 unsigned long ioarg )
9393{
9494 unsigned int retval = 0 ;
95- pMWAVE_DEVICE_DATA pDrvData = & mwave_s_mdd ;
95+ struct mwave_device_data * pDrvData = & mwave_s_mdd ;
9696 void __user * arg = (void __user * )ioarg ;
9797
9898 switch (iocmd ) {
@@ -110,27 +110,26 @@ static long mwave_ioctl(struct file *file, unsigned int iocmd,
110110 break ;
111111
112112 case IOCTL_MW_DSP_ABILITIES : {
113- MW_ABILITIES rAbilities ;
113+ struct mw_abilities rAbilities ;
114114
115115 mutex_lock (& mwave_mutex );
116116 retval = tp3780I_QueryAbilities (& pDrvData -> rBDData ,
117117 & rAbilities );
118118 mutex_unlock (& mwave_mutex );
119119 if (retval == 0 ) {
120- if ( copy_to_user (arg , & rAbilities ,
121- sizeof (MW_ABILITIES )) )
120+ if (copy_to_user (arg , & rAbilities , sizeof (rAbilities )))
122121 return - EFAULT ;
123122 }
124123 }
125124 break ;
126125
127126 case IOCTL_MW_READ_DATA :
128127 case IOCTL_MW_READCLEAR_DATA : {
129- MW_READWRITE rReadData ;
128+ struct mw_readwrite rReadData ;
130129 unsigned short __user * pusBuffer = NULL ;
131130
132131 if ( copy_from_user (& rReadData , arg ,
133- sizeof (MW_READWRITE )) )
132+ sizeof (struct mw_readwrite )) )
134133 return - EFAULT ;
135134 pusBuffer = (unsigned short __user * ) (rReadData .pBuf );
136135
@@ -145,11 +144,10 @@ static long mwave_ioctl(struct file *file, unsigned int iocmd,
145144 break ;
146145
147146 case IOCTL_MW_READ_INST : {
148- MW_READWRITE rReadData ;
147+ struct mw_readwrite rReadData ;
149148 unsigned short __user * pusBuffer = NULL ;
150149
151- if ( copy_from_user (& rReadData , arg ,
152- sizeof (MW_READWRITE )) )
150+ if (copy_from_user (& rReadData , arg , sizeof (rReadData )))
153151 return - EFAULT ;
154152 pusBuffer = (unsigned short __user * ) (rReadData .pBuf );
155153
@@ -163,11 +161,10 @@ static long mwave_ioctl(struct file *file, unsigned int iocmd,
163161 break ;
164162
165163 case IOCTL_MW_WRITE_DATA : {
166- MW_READWRITE rWriteData ;
164+ struct mw_readwrite rWriteData ;
167165 unsigned short __user * pusBuffer = NULL ;
168166
169- if ( copy_from_user (& rWriteData , arg ,
170- sizeof (MW_READWRITE )) )
167+ if (copy_from_user (& rWriteData , arg , sizeof (rWriteData )))
171168 return - EFAULT ;
172169 pusBuffer = (unsigned short __user * ) (rWriteData .pBuf );
173170
@@ -181,11 +178,10 @@ static long mwave_ioctl(struct file *file, unsigned int iocmd,
181178 break ;
182179
183180 case IOCTL_MW_WRITE_INST : {
184- MW_READWRITE rWriteData ;
181+ struct mw_readwrite rWriteData ;
185182 unsigned short __user * pusBuffer = NULL ;
186183
187- if ( copy_from_user (& rWriteData , arg ,
188- sizeof (MW_READWRITE )) )
184+ if (copy_from_user (& rWriteData , arg , sizeof (rWriteData )))
189185 return - EFAULT ;
190186 pusBuffer = (unsigned short __user * )(rWriteData .pBuf );
191187
@@ -336,7 +332,7 @@ static struct miscdevice mwave_misc_dev = { MWAVE_MINOR, "mwave", &mwave_fops };
336332*/
337333static void mwave_exit (void )
338334{
339- pMWAVE_DEVICE_DATA pDrvData = & mwave_s_mdd ;
335+ struct mwave_device_data * pDrvData = & mwave_s_mdd ;
340336
341337 if ( pDrvData -> sLine >= 0 ) {
342338 serial8250_unregister_port (pDrvData -> sLine );
@@ -361,9 +357,9 @@ static int __init mwave_init(void)
361357{
362358 int i ;
363359 int retval = 0 ;
364- pMWAVE_DEVICE_DATA pDrvData = & mwave_s_mdd ;
360+ struct mwave_device_data * pDrvData = & mwave_s_mdd ;
365361
366- memset (& mwave_s_mdd , 0 , sizeof (MWAVE_DEVICE_DATA ));
362+ memset (& mwave_s_mdd , 0 , sizeof (mwave_s_mdd ));
367363
368364 pDrvData -> bBDInitialized = false;
369365 pDrvData -> bResourcesClaimed = false;
0 commit comments