Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 995a9090 authored by Richard Cochran's avatar Richard Cochran Committed by David S. Miller
Browse files

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: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2173bff5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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)
+8 −0
Original line number Diff line number Diff line
@@ -136,4 +136,12 @@ struct ptp_clock_event {
extern void ptp_clock_event(struct ptp_clock *ptp,
			    struct ptp_clock_event *event);

/**
 * ptp_clock_index() - obtain the device index of a PTP clock
 *
 * @ptp:    The clock obtained from ptp_clock_register().
 */

extern int ptp_clock_index(struct ptp_clock *ptp);

#endif