diff options
author | Stefan Sørensen <stefan.sorensen@spectralink.com> | 2014-06-27 06:05:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-01 21:52:54 -0400 |
commit | e0155950f01d26c1ae82b99d13e05b2127c7b7ff (patch) | |
tree | f1b06a7e8d9ddcc41e92af359ccf49f9fe69c574 | |
parent | 6f39eb87de043ce778f584f4ae1b23c6db415a33 (diff) |
dp83640: Get calibration pin with ptp_find_pin
For consistency, use the ptp_find_pin function to get the calibration pin,
not gpio_tab.
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/dp83640.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index ab4811242458..293ad064905d 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c | |||
@@ -609,7 +609,11 @@ static void recalibrate(struct dp83640_clock *clock) | |||
609 | u16 cal_gpio, cfg0, evnt, ptp_trig, trigger, val; | 609 | u16 cal_gpio, cfg0, evnt, ptp_trig, trigger, val; |
610 | 610 | ||
611 | trigger = CAL_TRIGGER; | 611 | trigger = CAL_TRIGGER; |
612 | cal_gpio = gpio_tab[CALIBRATE_GPIO]; | 612 | cal_gpio = 1 + ptp_find_pin(clock->ptp_clock, PTP_PF_PHYSYNC, 0); |
613 | if (cal_gpio < 1) { | ||
614 | pr_err("PHY calibration pin not avaible - PHY is not calibrated."); | ||
615 | return; | ||
616 | } | ||
613 | 617 | ||
614 | mutex_lock(&clock->extreg_lock); | 618 | mutex_lock(&clock->extreg_lock); |
615 | 619 | ||