aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pps/pps.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c
index ca5183bdad85..c76afb980a98 100644
--- a/drivers/pps/pps.c
+++ b/drivers/pps/pps.c
@@ -61,8 +61,6 @@ static long pps_cdev_ioctl(struct file *file,
61{ 61{
62 struct pps_device *pps = file->private_data; 62 struct pps_device *pps = file->private_data;
63 struct pps_kparams params; 63 struct pps_kparams params;
64 struct pps_fdata fdata;
65 unsigned long ticks;
66 void __user *uarg = (void __user *) arg; 64 void __user *uarg = (void __user *) arg;
67 int __user *iuarg = (int __user *) arg; 65 int __user *iuarg = (int __user *) arg;
68 int err; 66 int err;
@@ -136,7 +134,9 @@ static long pps_cdev_ioctl(struct file *file,
136 134
137 break; 135 break;
138 136
139 case PPS_FETCH: 137 case PPS_FETCH: {
138 struct pps_fdata fdata;
139
140 pr_debug("PPS_FETCH: source %d\n", pps->id); 140 pr_debug("PPS_FETCH: source %d\n", pps->id);
141 141
142 err = copy_from_user(&fdata, uarg, sizeof(struct pps_fdata)); 142 err = copy_from_user(&fdata, uarg, sizeof(struct pps_fdata));
@@ -149,6 +149,8 @@ static long pps_cdev_ioctl(struct file *file,
149 if (fdata.timeout.flags & PPS_TIME_INVALID) 149 if (fdata.timeout.flags & PPS_TIME_INVALID)
150 err = wait_event_interruptible(pps->queue, pps->go); 150 err = wait_event_interruptible(pps->queue, pps->go);
151 else { 151 else {
152 unsigned long ticks;
153
152 pr_debug("timeout %lld.%09d\n", 154 pr_debug("timeout %lld.%09d\n",
153 (long long) fdata.timeout.sec, 155 (long long) fdata.timeout.sec,
154 fdata.timeout.nsec); 156 fdata.timeout.nsec);
@@ -185,7 +187,7 @@ static long pps_cdev_ioctl(struct file *file,
185 return -EFAULT; 187 return -EFAULT;
186 188
187 break; 189 break;
188 190 }
189 default: 191 default:
190 return -ENOTTY; 192 return -ENOTTY;
191 break; 193 break;