summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2012-04-03 22:59:16 +0000
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-03-31 16:04:13 +0200
commit2eec76f580983daa4248b5e1bb5971b420230491 (patch)
tree291b78386cf03c735853276c8d5b822ff2b18a34 /drivers
parent854877d2e30d5f7bb6a591186a2d26b2d69aa185 (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')
-rw-r--r--drivers/ptp/ptp_clock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 10451a15e828..17731231bb2d 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)
}
EXPORT_SYMBOL(ptp_clock_event);
+int ptp_clock_index(struct ptp_clock *ptp)
+{
+ return ptp->index;
+}
+EXPORT_SYMBOL(ptp_clock_index);
+
/* module operations */
static void __exit ptp_exit(void)