summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/dpll/dpll_core.c5
-rw-r--r--include/linux/dpll.h8
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c
index 4c2bb27c99fe..241db366b2c7 100644
--- a/drivers/dpll/dpll_core.c
+++ b/drivers/dpll/dpll_core.c
@@ -42,6 +42,11 @@ struct dpll_pin_registration {
void *priv;
};
+struct dpll_pin *netdev_dpll_pin(const struct net_device *dev)
+{
+ return rcu_dereference_rtnl(dev->dpll_pin);
+}
+
struct dpll_device *dpll_device_get_by_id(int id)
{
if (xa_get_mark(&dpll_device_xa, id, DPLL_REGISTERED))
diff --git a/include/linux/dpll.h b/include/linux/dpll.h
index 4ec2fe9caf5a..c60591308ae8 100644
--- a/include/linux/dpll.h
+++ b/include/linux/dpll.h
@@ -169,13 +169,13 @@ int dpll_device_change_ntf(struct dpll_device *dpll);
int dpll_pin_change_ntf(struct dpll_pin *pin);
+#if !IS_ENABLED(CONFIG_DPLL)
static inline struct dpll_pin *netdev_dpll_pin(const struct net_device *dev)
{
-#if IS_ENABLED(CONFIG_DPLL)
- return rcu_dereference_rtnl(dev->dpll_pin);
-#else
return NULL;
-#endif
}
+#else
+struct dpll_pin *netdev_dpll_pin(const struct net_device *dev);
+#endif
#endif