Messages in this thread | | | Date | Thu, 25 Sep 2014 12:30:11 +0200 | From | Johan Hovold <> | Subject | Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices |
| |
On Thu, Sep 25, 2014 at 01:25:24PM +0300, Octavian Purdila wrote:
> Johan, I think we don't really need the spinlock, the disconnect flag > and an atomic counter should work. Do you see any issues with that?
No, you need to test and increment atomically so the lock is needed.
Consider what could happen if you get a disconnect after testing but before incrementing.
Johan
| |