Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 25, 2014 at 1:30 PM, Johan Hovold <johan@xxxxxxxxxx> wrote:
> 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.
>

I am still not seeing the problem. We would continue with the
increment, we will try to send which will fail and go on the error
path where we will decrement and wake_up. What am I missing?
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux