diff options
author | Juergen Kilb <j.jilb@phytec.de> | 2010-06-12 21:22:01 +0200 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2010-07-12 00:14:29 -0700 |
commit | aa9fba5313a8a5c088d1cfc7708ed9d206105bc2 (patch) | |
tree | 88cfbd1e7d7a084e0829901a394f5ca8612ba15e /examples/standalone/smc911x_eeprom.c | |
parent | daa2ce6292c72a6136f1293e23833c587bb89233 (diff) | |
download | u-boot-imx-aa9fba5313a8a5c088d1cfc7708ed9d206105bc2.zip u-boot-imx-aa9fba5313a8a5c088d1cfc7708ed9d206105bc2.tar.gz u-boot-imx-aa9fba5313a8a5c088d1cfc7708ed9d206105bc2.tar.bz2 |
smc91xx_eeprom: Correct chip detection check.
The smc911x_detect function in /net/driver/net/smc911x.c
returns a 0 if everything was ok (a chip was found) and -1 else.
In the standalone example 'smc911x_eeprom' the return value
of smc911x_detect is interpreted in a different way
(0 for error, !0 as OK).
This leads to the error that the chip will not be detected.
Signed-off-by: Juergen Kilb <j.kilb@phytec.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'examples/standalone/smc911x_eeprom.c')
-rw-r--r-- | examples/standalone/smc911x_eeprom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c index c51a050..00e8266 100644 --- a/examples/standalone/smc911x_eeprom.c +++ b/examples/standalone/smc911x_eeprom.c @@ -240,7 +240,7 @@ static void dump_eeprom(struct eth_device *dev) static int smc911x_init(struct eth_device *dev) { /* See if there is anything there */ - if (!smc911x_detect_chip(dev)) + if (smc911x_detect_chip(dev)) return 1; smc911x_reset(dev); |