Re: [PATCH] rfkill-gpio: Use gpio cansleep version

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

 



On Wed, 2014-05-07 at 11:02 +0200, Johannes Berg wrote:
> On Tue, 2014-05-06 at 18:14 +0200, Loic Poulain wrote:
> 
> > +	if (gpiod_cansleep(rfkill->shutdown_gpio))
> > +		gpiod_set_value_cansleep(rfkill->shutdown_gpio, !blocked);
> > +	else
> > +		gpiod_set_value(rfkill->shutdown_gpio, !blocked);
> > +
> > +	if (gpiod_cansleep(rfkill->reset_gpio))
> > +		gpiod_set_value_cansleep(rfkill->reset_gpio, !blocked);
> > +	else
> > +		gpiod_set_value(rfkill->reset_gpio, !blocked);
> 
> Really? I mean, there's not even a fallback where the cansleep() API
> calls the non-sleeping one if the cansleep isn't support? This is really
> ugly.

Actually, it looks like unconditionally using the cansleep API should be
fine since it just calls the same internal helper function. Please
respin.

johannes

--
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