diff options
Diffstat (limited to 'drivers/pps/pps.c')
-rw-r--r-- | drivers/pps/pps.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c index fea17e7805e9..ca5183bdad85 100644 --- a/drivers/pps/pps.c +++ b/drivers/pps/pps.c | |||
@@ -71,9 +71,14 @@ static long pps_cdev_ioctl(struct file *file, | |||
71 | case PPS_GETPARAMS: | 71 | case PPS_GETPARAMS: |
72 | pr_debug("PPS_GETPARAMS: source %d\n", pps->id); | 72 | pr_debug("PPS_GETPARAMS: source %d\n", pps->id); |
73 | 73 | ||
74 | /* Return current parameters */ | 74 | spin_lock_irq(&pps->lock); |
75 | err = copy_to_user(uarg, &pps->params, | 75 | |
76 | sizeof(struct pps_kparams)); | 76 | /* Get the current parameters */ |
77 | params = pps->params; | ||
78 | |||
79 | spin_unlock_irq(&pps->lock); | ||
80 | |||
81 | err = copy_to_user(uarg, ¶ms, sizeof(struct pps_kparams)); | ||
77 | if (err) | 82 | if (err) |
78 | return -EFAULT; | 83 | return -EFAULT; |
79 | 84 | ||