Hi Samuel,
> Le 21 oct. 2015 à 08:00, Samuel Ortiz <[email protected]> a écrit :
>
> Hi Vincent,
>
>> On Mon, Sep 28, 2015 at 02:33:10PM +0200, Vincent Cuissard wrote:
>> +#ifdef CONFIG_OF
> Technically you don't need that as all of_* APIs are safe if CONFIG_OF_*
> are not defined.
Ok.
>> diff --git a/drivers/nfc/nfcmrvl/main.c b/drivers/nfc/nfcmrvl/main.c
>> index bd8db3d..1104fa3 100644
>> --- a/drivers/nfc/nfcmrvl/main.c
>> +++ b/drivers/nfc/nfcmrvl/main.c
>> @@ -33,6 +33,9 @@ static int nfcmrvl_nci_open(struct nci_dev *ndev)
>> if (test_and_set_bit(NFCMRVL_NCI_RUNNING, &priv->flags))
>> return 0;
>>
>> + /* Reset possible fault of previous session */
>> + clear_bit(NFCMRVL_PHY_ERROR, &priv->flags);
>> +
> How is that related to this i2c driver ?
i2c driver is currently the only deiver that needs to set this error. But in
the future other interfaces may need it too. That's why this clear code was
done in the main file to allow future code reuse.
>> err = priv->if_ops->nci_open(priv);
>>
>> if (err)
>> @@ -221,10 +224,8 @@ EXPORT_SYMBOL_GPL(nfcmrvl_nci_recv_frame);
>>
>> void nfcmrvl_chip_reset(struct nfcmrvl_private *priv)
>> {
>> - /*
>> - * This function does not take care if someone is using the device.
>> - * To be improved.
>> - */
>> + /* Reset possible fault of previous session */
>> + clear_bit(NFCMRVL_PHY_ERROR, &priv->flags);
Same.
Br,
--
Vincent--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html