diff options
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/st21nfcb/i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nfc/st21nfcb/i2c.c b/drivers/nfc/st21nfcb/i2c.c index eb886932d972..7b53a5c84041 100644 --- a/drivers/nfc/st21nfcb/i2c.c +++ b/drivers/nfc/st21nfcb/i2c.c | |||
@@ -109,7 +109,7 @@ static int st21nfcb_nci_i2c_write(void *phy_id, struct sk_buff *skb) | |||
109 | return phy->ndlc->hard_fault; | 109 | return phy->ndlc->hard_fault; |
110 | 110 | ||
111 | r = i2c_master_send(client, skb->data, skb->len); | 111 | r = i2c_master_send(client, skb->data, skb->len); |
112 | if (r == -EREMOTEIO) { /* Retry, chip was in standby */ | 112 | if (r < 0) { /* Retry, chip was in standby */ |
113 | usleep_range(1000, 4000); | 113 | usleep_range(1000, 4000); |
114 | r = i2c_master_send(client, skb->data, skb->len); | 114 | r = i2c_master_send(client, skb->data, skb->len); |
115 | } | 115 | } |
@@ -148,7 +148,7 @@ static int st21nfcb_nci_i2c_read(struct st21nfcb_i2c_phy *phy, | |||
148 | struct i2c_client *client = phy->i2c_dev; | 148 | struct i2c_client *client = phy->i2c_dev; |
149 | 149 | ||
150 | r = i2c_master_recv(client, buf, ST21NFCB_NCI_I2C_MIN_SIZE); | 150 | r = i2c_master_recv(client, buf, ST21NFCB_NCI_I2C_MIN_SIZE); |
151 | if (r == -EREMOTEIO) { /* Retry, chip was in standby */ | 151 | if (r < 0) { /* Retry, chip was in standby */ |
152 | usleep_range(1000, 4000); | 152 | usleep_range(1000, 4000); |
153 | r = i2c_master_recv(client, buf, ST21NFCB_NCI_I2C_MIN_SIZE); | 153 | r = i2c_master_recv(client, buf, ST21NFCB_NCI_I2C_MIN_SIZE); |
154 | } | 154 | } |