1
0
Fork 0
Commit Graph

3 Commits (dcb20d1a8e7d9602e52a9b673ae4d7f746d2cbb2)

Author SHA1 Message Date
Dan Carpenter fb5a18cf7c ptp: Fix some locking bugs in ptp_read()
In ptp_read there is an unlock missing on an error path, and a double
unlock on another error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-06-01 19:29:10 -07:00
Dan Carpenter e23ef227d1 ptp: Return -EFAULT on copy_to_user() errors
copy_to_user() returns the number of bytes remaining, but we want a
negative error code in ptp_ioctl.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-06-01 19:29:08 -07:00
Richard Cochran d94ba80ebb ptp: Added a brand new class driver for ptp clocks.
This patch adds an infrastructure for hardware clocks that implement
IEEE 1588, the Precision Time Protocol (PTP). A class driver offers a
registration method to particular hardware clock drivers. Each clock is
presented as a standard POSIX clock.

The ancillary clock features are exposed in two different ways, via
the sysfs and by a character device.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-05-23 13:01:00 -07:00