diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/phy.c | 13 | ||||
-rw-r--r-- | drivers/net/phy/phy_device.c | 19 |
2 files changed, 15 insertions, 17 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 1bb16cb79433..7670aac0e93f 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -65,7 +65,7 @@ EXPORT_SYMBOL(phy_print_status); | |||
65 | * | 65 | * |
66 | * Returns 0 on success on < 0 on error. | 66 | * Returns 0 on success on < 0 on error. |
67 | */ | 67 | */ |
68 | int phy_clear_interrupt(struct phy_device *phydev) | 68 | static int phy_clear_interrupt(struct phy_device *phydev) |
69 | { | 69 | { |
70 | int err = 0; | 70 | int err = 0; |
71 | 71 | ||
@@ -82,7 +82,7 @@ int phy_clear_interrupt(struct phy_device *phydev) | |||
82 | * | 82 | * |
83 | * Returns 0 on success on < 0 on error. | 83 | * Returns 0 on success on < 0 on error. |
84 | */ | 84 | */ |
85 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts) | 85 | static int phy_config_interrupt(struct phy_device *phydev, u32 interrupts) |
86 | { | 86 | { |
87 | int err = 0; | 87 | int err = 0; |
88 | 88 | ||
@@ -208,7 +208,7 @@ static inline int phy_find_valid(int idx, u32 features) | |||
208 | * duplexes. Drop down by one in this order: 1000/FULL, | 208 | * duplexes. Drop down by one in this order: 1000/FULL, |
209 | * 1000/HALF, 100/FULL, 100/HALF, 10/FULL, 10/HALF. | 209 | * 1000/HALF, 100/FULL, 100/HALF, 10/FULL, 10/HALF. |
210 | */ | 210 | */ |
211 | void phy_sanitize_settings(struct phy_device *phydev) | 211 | static void phy_sanitize_settings(struct phy_device *phydev) |
212 | { | 212 | { |
213 | u32 features = phydev->supported; | 213 | u32 features = phydev->supported; |
214 | int idx; | 214 | int idx; |
@@ -223,7 +223,6 @@ void phy_sanitize_settings(struct phy_device *phydev) | |||
223 | phydev->speed = settings[idx].speed; | 223 | phydev->speed = settings[idx].speed; |
224 | phydev->duplex = settings[idx].duplex; | 224 | phydev->duplex = settings[idx].duplex; |
225 | } | 225 | } |
226 | EXPORT_SYMBOL(phy_sanitize_settings); | ||
227 | 226 | ||
228 | /** | 227 | /** |
229 | * phy_ethtool_sset - generic ethtool sset function, handles all the details | 228 | * phy_ethtool_sset - generic ethtool sset function, handles all the details |
@@ -532,7 +531,7 @@ static irqreturn_t phy_interrupt(int irq, void *phy_dat) | |||
532 | * phy_enable_interrupts - Enable the interrupts from the PHY side | 531 | * phy_enable_interrupts - Enable the interrupts from the PHY side |
533 | * @phydev: target phy_device struct | 532 | * @phydev: target phy_device struct |
534 | */ | 533 | */ |
535 | int phy_enable_interrupts(struct phy_device *phydev) | 534 | static int phy_enable_interrupts(struct phy_device *phydev) |
536 | { | 535 | { |
537 | int err; | 536 | int err; |
538 | 537 | ||
@@ -545,13 +544,12 @@ int phy_enable_interrupts(struct phy_device *phydev) | |||
545 | 544 | ||
546 | return err; | 545 | return err; |
547 | } | 546 | } |
548 | EXPORT_SYMBOL(phy_enable_interrupts); | ||
549 | 547 | ||
550 | /** | 548 | /** |
551 | * phy_disable_interrupts - Disable the PHY interrupts from the PHY side | 549 | * phy_disable_interrupts - Disable the PHY interrupts from the PHY side |
552 | * @phydev: target phy_device struct | 550 | * @phydev: target phy_device struct |
553 | */ | 551 | */ |
554 | int phy_disable_interrupts(struct phy_device *phydev) | 552 | static int phy_disable_interrupts(struct phy_device *phydev) |
555 | { | 553 | { |
556 | int err; | 554 | int err; |
557 | 555 | ||
@@ -574,7 +572,6 @@ phy_err: | |||
574 | 572 | ||
575 | return err; | 573 | return err; |
576 | } | 574 | } |
577 | EXPORT_SYMBOL(phy_disable_interrupts); | ||
578 | 575 | ||
579 | /** | 576 | /** |
580 | * phy_start_interrupts - request and enable interrupts for a PHY device | 577 | * phy_start_interrupts - request and enable interrupts for a PHY device |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 16ddc77313cb..993c52c82aeb 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -57,6 +57,9 @@ extern void mdio_bus_exit(void); | |||
57 | static LIST_HEAD(phy_fixup_list); | 57 | static LIST_HEAD(phy_fixup_list); |
58 | static DEFINE_MUTEX(phy_fixup_lock); | 58 | static DEFINE_MUTEX(phy_fixup_lock); |
59 | 59 | ||
60 | static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | ||
61 | u32 flags, phy_interface_t interface); | ||
62 | |||
60 | /* | 63 | /* |
61 | * Creates a new phy_fixup and adds it to the list | 64 | * Creates a new phy_fixup and adds it to the list |
62 | * @bus_id: A string which matches phydev->dev.bus_id (or PHY_ANY_ID) | 65 | * @bus_id: A string which matches phydev->dev.bus_id (or PHY_ANY_ID) |
@@ -146,7 +149,8 @@ int phy_scan_fixups(struct phy_device *phydev) | |||
146 | } | 149 | } |
147 | EXPORT_SYMBOL(phy_scan_fixups); | 150 | EXPORT_SYMBOL(phy_scan_fixups); |
148 | 151 | ||
149 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id) | 152 | static struct phy_device* phy_device_create(struct mii_bus *bus, |
153 | int addr, int phy_id) | ||
150 | { | 154 | { |
151 | struct phy_device *dev; | 155 | struct phy_device *dev; |
152 | 156 | ||
@@ -193,7 +197,6 @@ struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id) | |||
193 | 197 | ||
194 | return dev; | 198 | return dev; |
195 | } | 199 | } |
196 | EXPORT_SYMBOL(phy_device_create); | ||
197 | 200 | ||
198 | /** | 201 | /** |
199 | * get_phy_id - reads the specified addr for its ID. | 202 | * get_phy_id - reads the specified addr for its ID. |
@@ -316,7 +319,7 @@ EXPORT_SYMBOL(phy_find_first); | |||
316 | * If you want to monitor your own link state, don't call | 319 | * If you want to monitor your own link state, don't call |
317 | * this function. | 320 | * this function. |
318 | */ | 321 | */ |
319 | void phy_prepare_link(struct phy_device *phydev, | 322 | static void phy_prepare_link(struct phy_device *phydev, |
320 | void (*handler)(struct net_device *)) | 323 | void (*handler)(struct net_device *)) |
321 | { | 324 | { |
322 | phydev->adjust_link = handler; | 325 | phydev->adjust_link = handler; |
@@ -435,8 +438,8 @@ int phy_init_hw(struct phy_device *phydev) | |||
435 | * the attaching device, and given a callback for link status | 438 | * the attaching device, and given a callback for link status |
436 | * change. The phy_device is returned to the attaching driver. | 439 | * change. The phy_device is returned to the attaching driver. |
437 | */ | 440 | */ |
438 | int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | 441 | static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, |
439 | u32 flags, phy_interface_t interface) | 442 | u32 flags, phy_interface_t interface) |
440 | { | 443 | { |
441 | struct device *d = &phydev->dev; | 444 | struct device *d = &phydev->dev; |
442 | 445 | ||
@@ -473,7 +476,6 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
473 | * (dev_flags and interface) */ | 476 | * (dev_flags and interface) */ |
474 | return phy_init_hw(phydev); | 477 | return phy_init_hw(phydev); |
475 | } | 478 | } |
476 | EXPORT_SYMBOL(phy_attach_direct); | ||
477 | 479 | ||
478 | /** | 480 | /** |
479 | * phy_attach - attach a network device to a particular PHY device | 481 | * phy_attach - attach a network device to a particular PHY device |
@@ -540,7 +542,7 @@ EXPORT_SYMBOL(phy_detach); | |||
540 | * what is supported. Returns < 0 on error, 0 if the PHY's advertisement | 542 | * what is supported. Returns < 0 on error, 0 if the PHY's advertisement |
541 | * hasn't changed, and > 0 if it has changed. | 543 | * hasn't changed, and > 0 if it has changed. |
542 | */ | 544 | */ |
543 | int genphy_config_advert(struct phy_device *phydev) | 545 | static int genphy_config_advert(struct phy_device *phydev) |
544 | { | 546 | { |
545 | u32 advertise; | 547 | u32 advertise; |
546 | int oldadv, adv; | 548 | int oldadv, adv; |
@@ -605,7 +607,6 @@ int genphy_config_advert(struct phy_device *phydev) | |||
605 | 607 | ||
606 | return changed; | 608 | return changed; |
607 | } | 609 | } |
608 | EXPORT_SYMBOL(genphy_config_advert); | ||
609 | 610 | ||
610 | /** | 611 | /** |
611 | * genphy_setup_forced - configures/forces speed/duplex from @phydev | 612 | * genphy_setup_forced - configures/forces speed/duplex from @phydev |
@@ -615,7 +616,7 @@ EXPORT_SYMBOL(genphy_config_advert); | |||
615 | * to the values in phydev. Assumes that the values are valid. | 616 | * to the values in phydev. Assumes that the values are valid. |
616 | * Please see phy_sanitize_settings(). | 617 | * Please see phy_sanitize_settings(). |
617 | */ | 618 | */ |
618 | int genphy_setup_forced(struct phy_device *phydev) | 619 | static int genphy_setup_forced(struct phy_device *phydev) |
619 | { | 620 | { |
620 | int err; | 621 | int err; |
621 | int ctl = 0; | 622 | int ctl = 0; |