diff options
author | Alexander Gordeev <lasaine@lvk.cs.msu.su> | 2011-01-12 17:00:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 08:03:19 -0800 |
commit | 86d921f9ec06bc3fd357a77877d37a604d5674c3 (patch) | |
tree | ad858d8b8009b659f5361d61a37040e3d847fd86 /drivers/pps | |
parent | 7a21a3cc0be92e70474cc2ab06cb074f6a7c3f09 (diff) |
pps: declare variables where they are used in switch
Move variable declarations where they are used in pps_cdev_ioctl.
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Acked-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pps')
-rw-r--r-- | drivers/pps/pps.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c index ca5183bdad8..c76afb980a9 100644 --- a/drivers/pps/pps.c +++ b/drivers/pps/pps.c @@ -61,8 +61,6 @@ static long pps_cdev_ioctl(struct file *file, { struct pps_device *pps = file->private_data; struct pps_kparams params; - struct pps_fdata fdata; - unsigned long ticks; void __user *uarg = (void __user *) arg; int __user *iuarg = (int __user *) arg; int err; @@ -136,7 +134,9 @@ static long pps_cdev_ioctl(struct file *file, break; - case PPS_FETCH: + case PPS_FETCH: { + struct pps_fdata fdata; + pr_debug("PPS_FETCH: source %d\n", pps->id); err = copy_from_user(&fdata, uarg, sizeof(struct pps_fdata)); @@ -149,6 +149,8 @@ static long pps_cdev_ioctl(struct file *file, if (fdata.timeout.flags & PPS_TIME_INVALID) err = wait_event_interruptible(pps->queue, pps->go); else { + unsigned long ticks; + pr_debug("timeout %lld.%09d\n", (long long) fdata.timeout.sec, fdata.timeout.nsec); @@ -185,7 +187,7 @@ static long pps_cdev_ioctl(struct file *file, return -EFAULT; break; - + } default: return -ENOTTY; break; |