9
0
Fork 0

smc911x: fix typo pn check if the device is ready before using it

the check need to be inverted

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-09-07 16:11:39 +02:00 committed by Sascha Hauer
parent 0223c3a149
commit 0c4ea17225
1 changed files with 1 additions and 1 deletions

View File

@ -456,7 +456,7 @@ static int smc911x_probe(struct device_d *dev)
* poll the READY bit in PMT_CTRL. Any other access to the device is
* forbidden while this bit isn't set. Try for 100ms
*/
ret = wait_on_timeout(100 * MSECOND, smc911x_reg_read(priv, PMT_CTRL) & PMT_CTRL_READY);
ret = wait_on_timeout(100 * MSECOND, !smc911x_reg_read(priv, PMT_CTRL) & PMT_CTRL_READY);
if (!ret) {
dev_err(dev, "Device not READY in 100ms aborting\n");
return -ENODEV;