unsigned int irq_polarity;
int powered;
-
- /*
- * < 0 if hardware error occured (e.g. i2c err)
- * and prevents normal operation.
- */
- int hard_fault;
};
#define I2C_DUMP_SKB(info, skb) \
I2C_DUMP_SKB("st21nfcb_nci_i2c_write", skb);
- if (phy->hard_fault != 0)
- return phy->hard_fault;
+ if (phy->ndlc->hard_fault != 0)
+ return phy->ndlc->hard_fault;
r = i2c_master_send(client, skb->data, skb->len);
if (r == -EREMOTEIO) { /* Retry, chip was in standby */
client = phy->i2c_dev;
dev_dbg(&client->dev, "IRQ\n");
- if (phy->hard_fault)
+ if (phy->ndlc->hard_fault)
return IRQ_HANDLED;
if (!phy->powered) {
}
r = st21nfcb_nci_i2c_read(phy, &skb);
- if (r == -EREMOTEIO) {
- phy->hard_fault = r;
- ndlc_recv(phy->ndlc, NULL);
- return IRQ_HANDLED;
- } else if (r == -ENOMEM || r == -EBADMSG) {
+ if (r == -EREMOTEIO || r == -ENOMEM || r == -EBADMSG)
return IRQ_HANDLED;
- }
ndlc_recv(phy->ndlc, skb);