Merge git://git.infradead.org/users/eparis/audit
[firefly-linux-kernel-4.4.55.git] / include / linux / phy_fixed.h
index ae612acebb53d2f0bf121226afde877cb4d32f91..f2ca1b459377803094005029cc765ef1f3a9abd6 100644 (file)
@@ -14,34 +14,35 @@ struct device_node;
 #ifdef CONFIG_FIXED_PHY
 extern int fixed_phy_add(unsigned int irq, int phy_id,
                         struct fixed_phy_status *status);
-extern int fixed_phy_register(unsigned int irq,
-                             struct fixed_phy_status *status,
-                             struct device_node *np);
+extern struct phy_device *fixed_phy_register(unsigned int irq,
+                                            struct fixed_phy_status *status,
+                                            struct device_node *np);
 extern void fixed_phy_del(int phy_addr);
+extern int fixed_phy_set_link_update(struct phy_device *phydev,
+                       int (*link_update)(struct net_device *,
+                                          struct fixed_phy_status *));
 #else
 static inline int fixed_phy_add(unsigned int irq, int phy_id,
                                struct fixed_phy_status *status)
 {
        return -ENODEV;
 }
-static inline int fixed_phy_register(unsigned int irq,
-                                    struct fixed_phy_status *status,
-                                    struct device_node *np)
+static inline struct phy_device *fixed_phy_register(unsigned int irq,
+                                               struct fixed_phy_status *status,
+                                               struct device_node *np)
 {
-       return -ENODEV;
+       return ERR_PTR(-ENODEV);
 }
 static inline int fixed_phy_del(int phy_addr)
 {
        return -ENODEV;
 }
-#endif /* CONFIG_FIXED_PHY */
-
-/*
- * This function issued only by fixed_phy-aware drivers, no need
- * protect it with #ifdef
- */
-extern int fixed_phy_set_link_update(struct phy_device *phydev,
+static inline int fixed_phy_set_link_update(struct phy_device *phydev,
                        int (*link_update)(struct net_device *,
-                                          struct fixed_phy_status *));
+                                          struct fixed_phy_status *))
+{
+       return -ENODEV;
+}
+#endif /* CONFIG_FIXED_PHY */
 
 #endif /* __PHY_FIXED_H */