From 995a9090b2b7dc734351f3ac0ba8d913ffb87001 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Tue, 3 Apr 2012 22:59:16 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/ptp/ptp_clock.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/ptp') 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) } 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) -- cgit v1.2.2