[PATCH net-next v13 12/14] net: ptp: Move ptp_clock_index() to builtin symbol

From: Kory Maincent
Date: Wed May 29 2024 - 05:45:29 EST


Move ptp_clock_index() to builtin symbols to prepare for supporting get
and set hardware timestamps from ethtool, which is builtin.

Signed-off-by: Kory Maincent <kory.maincent@xxxxxxxxxxx>
---

Change in v13:
- New patch
---
drivers/ptp/ptp_clock.c | 6 ------
drivers/ptp/ptp_clock_consumer.c | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 593b5c906314..fc4b266abe1d 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -460,12 +460,6 @@ 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);
-
int ptp_find_pin(struct ptp_clock *ptp,
enum ptp_pin_function func, unsigned int chan)
{
diff --git a/drivers/ptp/ptp_clock_consumer.c b/drivers/ptp/ptp_clock_consumer.c
index 759dd6f63405..2322fa65075e 100644
--- a/drivers/ptp/ptp_clock_consumer.c
+++ b/drivers/ptp/ptp_clock_consumer.c
@@ -97,3 +97,9 @@ void ptp_clock_put(struct device *dev, struct ptp_clock *ptp)
put_device(&ptp->dev);
module_put(ptp->info->owner);
}
+
+int ptp_clock_index(struct ptp_clock *ptp)
+{
+ return ptp->index;
+}
+EXPORT_SYMBOL(ptp_clock_index);

--
2.34.1