diff options
| author | Petri Gynther <pgynther@google.com> | 2014-10-06 14:38:30 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-10-07 13:06:45 -0400 |
| commit | fd2ef0ba3071c92ac6272ab22ea3f2b16d88a4eb (patch) | |
| tree | e9d32e03bc599e39fb55b1b79269cbc08ae3ba20 /include/linux | |
| parent | 02c0fc1b8f41e6e895d6573615ba8ff549b685d2 (diff) | |
net: phy: adjust fixed_phy_register() return value
Adjust fixed_phy_register() to return struct phy_device *, so that
it becomes easy to use fixed PHYs without device tree support:
phydev = fixed_phy_register(PHY_POLL, &fixed_phy_status, NULL);
fixed_phy_set_link_update(phydev, fixed_phy_link_update);
phy_connect_direct(netdev, phydev, handler_fn, phy_interface);
This change is a prerequisite for modifying bcmgenet driver to work
without a device tree on Broadcom's MIPS-based 7xxx platforms.
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/phy_fixed.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h index 941138664c1d..f2ca1b459377 100644 --- a/include/linux/phy_fixed.h +++ b/include/linux/phy_fixed.h | |||
| @@ -14,9 +14,9 @@ struct device_node; | |||
| 14 | #ifdef CONFIG_FIXED_PHY | 14 | #ifdef CONFIG_FIXED_PHY |
| 15 | extern int fixed_phy_add(unsigned int irq, int phy_id, | 15 | extern int fixed_phy_add(unsigned int irq, int phy_id, |
| 16 | struct fixed_phy_status *status); | 16 | struct fixed_phy_status *status); |
| 17 | extern int fixed_phy_register(unsigned int irq, | 17 | extern struct phy_device *fixed_phy_register(unsigned int irq, |
| 18 | struct fixed_phy_status *status, | 18 | struct fixed_phy_status *status, |
| 19 | struct device_node *np); | 19 | struct device_node *np); |
| 20 | extern void fixed_phy_del(int phy_addr); | 20 | extern void fixed_phy_del(int phy_addr); |
| 21 | extern int fixed_phy_set_link_update(struct phy_device *phydev, | 21 | extern int fixed_phy_set_link_update(struct phy_device *phydev, |
| 22 | int (*link_update)(struct net_device *, | 22 | int (*link_update)(struct net_device *, |
| @@ -27,11 +27,11 @@ static inline int fixed_phy_add(unsigned int irq, int phy_id, | |||
| 27 | { | 27 | { |
| 28 | return -ENODEV; | 28 | return -ENODEV; |
| 29 | } | 29 | } |
| 30 | static inline int fixed_phy_register(unsigned int irq, | 30 | static inline struct phy_device *fixed_phy_register(unsigned int irq, |
| 31 | struct fixed_phy_status *status, | 31 | struct fixed_phy_status *status, |
| 32 | struct device_node *np) | 32 | struct device_node *np) |
| 33 | { | 33 | { |
| 34 | return -ENODEV; | 34 | return ERR_PTR(-ENODEV); |
| 35 | } | 35 | } |
| 36 | static inline int fixed_phy_del(int phy_addr) | 36 | static inline int fixed_phy_del(int phy_addr) |
| 37 | { | 37 | { |
