diff options
author | Richard Cochran <richardcochran@gmail.com> | 2012-04-03 18:59:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-04 05:28:45 -0400 |
commit | 995a9090b2b7dc734351f3ac0ba8d913ffb87001 (patch) | |
tree | ff47973003ce5c420ca556739885c85d9daa68ee /drivers/ptp | |
parent | 2173bff5dcff4ca02226978f39648b66a8c3ca1e (diff) |
ptp: Add a method for obtaining the device index.
This commit adds a method that MAC drivers may call in order to find out
the device number of their associated PTP Hardware Clock.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp')
-rw-r--r-- | drivers/ptp/ptp_clock.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c index f519a131238d..1e528b539a07 100644 --- a/drivers/ptp/ptp_clock.c +++ b/drivers/ptp/ptp_clock.c | |||
@@ -304,6 +304,12 @@ void ptp_clock_event(struct ptp_clock *ptp, struct ptp_clock_event *event) | |||
304 | } | 304 | } |
305 | EXPORT_SYMBOL(ptp_clock_event); | 305 | EXPORT_SYMBOL(ptp_clock_event); |
306 | 306 | ||
307 | int ptp_clock_index(struct ptp_clock *ptp) | ||
308 | { | ||
309 | return ptp->index; | ||
310 | } | ||
311 | EXPORT_SYMBOL(ptp_clock_index); | ||
312 | |||
307 | /* module operations */ | 313 | /* module operations */ |
308 | 314 | ||
309 | static void __exit ptp_exit(void) | 315 | static void __exit ptp_exit(void) |