Remove the auto-direction-setting code now that we have setquickusb
authorMichael Brown <mbrown@fensystems.co.uk>
Tue, 14 Mar 2006 14:15:20 +0000 (14:15 +0000)
committerMichael Brown <mbrown@fensystems.co.uk>
Tue, 14 Mar 2006 14:15:20 +0000 (14:15 +0000)
kernel/quickusb.c

index 488c492..467e300 100644 (file)
@@ -83,35 +83,6 @@ static int dev_major = 0;
  *
  */
 
-static int quickusb_gppio_open ( struct inode *inode, struct file *file ) {
-       struct quickusb_gppio *gppio = file->private_data;
-       unsigned int fmode_rw;
-       int rc;
-
-       fmode_rw = ( file->f_mode & ( FMODE_READ | FMODE_WRITE ) );
-       switch ( fmode_rw ) {
-       case FMODE_READ:
-               if ( ( rc = quickusb_write_port_dir ( gppio->quickusb->usb,
-                                                     gppio->port,
-                                                     0x00 ) ) != 0 )
-                       return rc;
-               break;
-       case FMODE_WRITE:
-               if ( ( rc = quickusb_write_port_dir ( gppio->quickusb->usb,
-                                                     gppio->port,
-                                                     0xff ) ) != 0 )
-                       return rc;
-               break;
-       default:
-               /* Do not set port direction; opener must use ioctl to
-                * set individual bits
-                */
-               break;
-       }
-
-       return 0;
-}
-
 static ssize_t quickusb_gppio_read ( struct file *file, char __user *user_data,
                                     size_t len, loff_t *ppos ) {
        struct quickusb_gppio *gppio = file->private_data;
@@ -198,7 +169,6 @@ static int quickusb_gppio_release ( struct inode *inode, struct file *file ) {
 
 static struct file_operations quickusb_gppio_fops = {
        .owner          = THIS_MODULE,
-       .open           = quickusb_gppio_open,
        .read           = quickusb_gppio_read,
        .write          = quickusb_gppio_write,
        .ioctl          = quickusb_gppio_ioctl,