diff options
Diffstat (limited to 'drivers/pps')
| -rw-r--r-- | drivers/pps/clients/pps-gpio.c | 3 | ||||
| -rw-r--r-- | drivers/pps/pps.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 935da68610c7..65d17781ddb7 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -117,6 +117,9 @@ static int pps_gpio_setup(struct device *dev) data->assert_falling_edge = device_property_read_bool(dev, "assert-falling-edge"); + data->capture_clear = + device_property_read_bool(dev, "capture-clear"); + data->echo_pin = devm_gpiod_get_optional(dev, "echo", GPIOD_OUT_LOW); if (IS_ERR(data->echo_pin)) return dev_err_probe(dev, PTR_ERR(data->echo_pin), diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c index c6b8b6478276..442d7e8f6fb9 100644 --- a/drivers/pps/pps.c +++ b/drivers/pps/pps.c @@ -254,12 +254,13 @@ static long pps_cdev_ioctl(struct file *file, static long pps_cdev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - struct pps_device *pps = file->private_data; - void __user *uarg = (void __user *) arg; cmd = _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(void *)); +#ifdef CONFIG_X86_64 if (cmd == PPS_FETCH) { + struct pps_device *pps = file->private_data; + void __user *uarg = (void __user *) arg; struct pps_fdata_compat compat; struct pps_fdata fdata; int err; @@ -296,6 +297,7 @@ static long pps_cdev_compat_ioctl(struct file *file, return copy_to_user(uarg, &compat, sizeof(struct pps_fdata_compat)) ? -EFAULT : 0; } +#endif return pps_cdev_ioctl(file, cmd, arg); } |
