]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ieee1394...
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 19 Feb 2007 21:07:19 +0000 (13:07 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 19 Feb 2007 21:07:19 +0000 (13:07 -0800)
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: fix another deadlock in nodemgr
  ieee1394: cycle timer read extension for raw1394

1  2 
drivers/ieee1394/raw1394.c

index aa9ca8385ec769304e0bc928c51d52be92641aa6,5d08d7450f96c25f6953aaeb99e822b575fbca0c..bb897a37d9f778cf2f64661c06069461d5d63fc5
@@@ -2669,6 -2669,18 +2669,18 @@@ static void raw1394_iso_shutdown(struc
        fi->iso_state = RAW1394_ISO_INACTIVE;
  }
  
+ static int raw1394_read_cycle_timer(struct file_info *fi, void __user * uaddr)
+ {
+       struct raw1394_cycle_timer ct;
+       int err;
+       err = hpsb_read_cycle_timer(fi->host, &ct.cycle_timer, &ct.local_time);
+       if (!err)
+               if (copy_to_user(uaddr, &ct, sizeof(ct)))
+                       err = -EFAULT;
+       return err;
+ }
  /* mmap the rawiso xmit/recv buffer */
  static int raw1394_mmap(struct file *file, struct vm_area_struct *vma)
  {
@@@ -2777,6 -2789,14 +2789,14 @@@ static int raw1394_ioctl(struct inode *
                break;
        }
  
+       /* state-independent commands */
+       switch(cmd) {
+       case RAW1394_IOC_GET_CYCLE_TIMER:
+               return raw1394_read_cycle_timer(fi, argp);
+       default:
+               break;
+       }
        return -EINVAL;
  }
  
@@@ -3013,7 -3033,7 +3033,7 @@@ static struct hpsb_highlevel raw1394_hi
  };
  
  static struct cdev raw1394_cdev;
 -static struct file_operations raw1394_fops = {
 +static const struct file_operations raw1394_fops = {
        .owner = THIS_MODULE,
        .read = raw1394_read,
        .write = raw1394_write,