@@ -109,6 +109,7 @@ static DEFINE_MUTEX(pp_do_mutex);
109109static inline void pp_enable_irq (struct pp_struct * pp )
110110{
111111 struct parport * port = pp -> pdev -> port ;
112+
112113 port -> ops -> enable_irq (port );
113114}
114115
@@ -368,6 +369,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
368369 /* Deferred device registration. */
369370 if (!pp -> pdev ) {
370371 int err = register_device (minor , pp );
372+
371373 if (err ) {
372374 return err ;
373375 }
@@ -412,6 +414,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
412414 case PPSETMODE :
413415 {
414416 int mode ;
417+
415418 if (copy_from_user (& mode , argp , sizeof (mode )))
416419 return - EFAULT ;
417420 /* FIXME: validate mode */
@@ -442,6 +445,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
442445 case PPSETPHASE :
443446 {
444447 int phase ;
448+
445449 if (copy_from_user (& phase , argp , sizeof (phase ))) {
446450 return - EFAULT ;
447451 }
@@ -665,6 +669,7 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
665669static long pp_ioctl (struct file * file , unsigned int cmd , unsigned long arg )
666670{
667671 long ret ;
672+
668673 mutex_lock (& pp_do_mutex );
669674 ret = pp_do_ioctl (file , cmd , arg );
670675 mutex_unlock (& pp_do_mutex );
@@ -755,6 +760,7 @@ static int pp_release(struct inode *inode, struct file *file)
755760
756761 if (pp -> pdev ) {
757762 const char * name = pp -> pdev -> name ;
763+
758764 parport_unregister_device (pp -> pdev );
759765 kfree (name );
760766 pp -> pdev = NULL ;
0 commit comments