Merge branch 'fortglx/3.0/tip/timers/ptp' of git://git.linaro.org/people/jstultz/linux into timers/urgent

This commit is contained in:
Thomas Gleixner 2011-06-06 21:12:32 +02:00
commit f6509b5f00

View File

@ -46,7 +46,8 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
caps.n_ext_ts = ptp->info->n_ext_ts; caps.n_ext_ts = ptp->info->n_ext_ts;
caps.n_per_out = ptp->info->n_per_out; caps.n_per_out = ptp->info->n_per_out;
caps.pps = ptp->info->pps; caps.pps = ptp->info->pps;
err = copy_to_user((void __user *)arg, &caps, sizeof(caps)); if (copy_to_user((void __user *)arg, &caps, sizeof(caps)))
err = -EFAULT;
break; break;
case PTP_EXTTS_REQUEST: case PTP_EXTTS_REQUEST:
@ -129,8 +130,10 @@ ssize_t ptp_read(struct posix_clock *pc,
return -ERESTARTSYS; return -ERESTARTSYS;
} }
if (ptp->defunct) if (ptp->defunct) {
mutex_unlock(&ptp->tsevq_mux);
return -ENODEV; return -ENODEV;
}
spin_lock_irqsave(&queue->lock, flags); spin_lock_irqsave(&queue->lock, flags);
@ -150,10 +153,8 @@ ssize_t ptp_read(struct posix_clock *pc,
mutex_unlock(&ptp->tsevq_mux); mutex_unlock(&ptp->tsevq_mux);
if (copy_to_user(buf, event, cnt)) { if (copy_to_user(buf, event, cnt))
mutex_unlock(&ptp->tsevq_mux);
return -EFAULT; return -EFAULT;
}
return cnt; return cnt;
} }