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:
parent
0223c3a149
commit
0c4ea17225
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue