alistair23-linux/drivers
Alexandre Courbot 0e9a5edf5d gpio: fix deferred probe detection for legacy API
Commit 14e85c0e69 ("gpio: remove gpio_descs global array") changed
gpio_to_desc()'s behavior to return NULL not only for GPIOs numbers
not in the valid range, but also for all GPIOs whose controller has not
been probed yet. Although this behavior is more correct (nothing hints
that these GPIO numbers will be populated later), this affects
gpio_request() and gpio_request_one() which call gpiod_request() with a
NULL descriptor, causing it to return -EINVAL instead of the expected
-EPROBE_DEFER for a non-probed GPIO.

gpiod_request() is only called with a descriptor obtained from
gpio_to_desc() from these two functions, so address the issue there.

Other ways to obtain GPIOs rely on well-defined mappings and can thus
return -EPROBE_DEFER only for relevant GPIOs, and are thus not affected
by this issue.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-12-02 15:46:36 +01:00
..
accessibility
acpi Linux 3.17 2014-10-11 11:34:07 -07:00
amba PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h 2014-09-30 01:16:44 +02:00
ata Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
atm atm: simplify lanai.c by using module_pci_driver 2014-10-17 11:55:32 -04:00
auxdisplay
base IOMMU Updates for Linux v3.18 2014-10-15 07:23:49 +02:00
bcma This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
block Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
bluetooth Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-10-13 11:28:42 +02:00
bus ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
cdrom
char One cc: stable commit, the rest are a series of minor cleanups which have 2014-10-18 10:25:09 -07:00
clk The clk tree changes for 3.18 are dominated by clock drivers. Mostly 2014-10-15 07:05:03 +02:00
clocksource Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
connector
cpufreq The clk tree changes for 3.18 are dominated by clock drivers. Mostly 2014-10-15 07:05:03 +02:00
cpuidle Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
crypto crypto: LLVMLinux: Remove VLAIS from crypto/.../qat_algs.c 2014-10-14 10:51:23 +02:00
dca
devfreq PM / devfreq: exynos: Enable building exynos PPMU as module 2014-09-29 20:22:36 +09:00
dio
dma Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
dma-buf dma-buf: don't open-code atomic_long_read() 2014-10-09 02:39:07 -04:00
edac edac updates for v3.18-rc1 2014-10-10 22:07:55 -04:00
eisa
extcon
firewire
firmware drivers/firmware/memmap.c: don't create memmap sysfs of same firmware_map_entry 2014-10-09 22:26:00 -04:00
fmc
gpio gpio: fix deferred probe detection for legacy API 2014-12-02 15:46:36 +01:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-10-14 09:39:08 +02:00
hid This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
hsi
hv
hwmon hwmon: (ab8500) Call kernel_power_off instead of pm_power_off 2014-10-03 08:19:02 -07:00
hwspinlock
i2c Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-10-19 12:50:44 -07:00
ide Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
idle
iio iio: sensors-core: st: Check st_sensors_set_drdy_int_pin()'s return value 2014-09-26 08:15:27 +01:00
infiniband Main set of InfiniBand/RDMA updates for 3.18 merge window: 2014-10-19 12:29:23 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-10-19 12:40:24 -07:00
iommu IOMMU Updates for Linux v3.18 2014-10-15 07:23:49 +02:00
ipack
irqchip Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
isdn isdn/gigaset: fix usb_gigaset write_cmd result race 2014-10-14 15:05:35 -04:00
leds New driver for menf21bmc. 2014-10-10 16:40:14 -04:00
lguest
macintosh
mailbox
mcb
md . fix DM's long-standing excessive use of memory by leveraging the new 2014-10-18 12:25:30 -07:00
media Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
memory
memstick memstick: r592: fix build warnings for !PM_SLEEP 2014-10-14 02:18:22 +02:00
message SCSI for-linus on 20141007 2014-10-07 21:29:18 -04:00
mfd Changes to existing drivers: 2014-10-15 06:58:16 +02:00
misc Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
mmc Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
mtd Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
net mdio-mux-gpio: Use GPIO descriptor interface and new gpiod_set_array function 2014-11-28 14:48:18 +01:00
nfc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2014-10-07 14:48:29 -04:00
ntb ntb: Adding split BAR support for Haswell platforms 2014-10-17 07:08:51 -04:00
nubus
of Devicetree changes for v3.18 2014-10-11 06:47:50 -04:00
oprofile
parisc Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 16:23:15 +02:00
parport
pci xen: features and fixes for 3.18-rc0 2014-10-11 20:29:01 -04:00
pcmcia
phy
pinctrl gpio: rename gpio_lock_as_irq to gpiochip_lock_as_irq 2014-10-28 17:30:59 +01:00
platform thinkpad_acpi: replace strnicmp with strncasecmp 2014-10-14 02:18:25 +02:00
pnp PNP: replace strnicmp with strncasecmp 2014-10-14 02:18:25 +02:00
power power supply and reset changes for the v3.18 series 2014-10-15 06:56:23 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator power supply and reset changes for the v3.18 series 2014-10-15 06:56:23 +02:00
remoteproc
reset
rpmsg
rtc rtc-cmos: fix wakeup from S5 without CONFIG_PM_SLEEP 2014-10-14 02:18:19 +02:00
s390 Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
sbus
scsi Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block 2014-10-18 12:12:45 -07:00
sfi
sh
sn
soc ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
spi Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
spmi
ssb This is the bulk of GPIO changes for the v3.18 development 2014-10-09 14:58:15 -04:00
staging Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-10-14 09:39:08 +02:00
target Merge branch 'for-3.18/core' of git://git.kernel.dk/linux-block 2014-10-18 11:53:51 -07:00
tc
thermal thermal: replace strnicmp with strncasecmp 2014-10-14 02:18:25 +02:00
thunderbolt
tty serial: mctrl_gpio: use gpiod_set_array function 2014-12-02 14:25:42 +01:00
uio
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-10-13 11:28:42 +02:00
uwb
vfio IOMMU Updates for Linux v3.18 2014-10-15 07:23:49 +02:00
vhost
video Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
virt
virtio One cc: stable commit, the rest are a series of minor cleanups which have 2014-10-18 10:25:09 -07:00
vlynq
vme
w1
watchdog New driver for menf21bmc. 2014-10-10 16:40:14 -04:00
xen xen: features and fixes for 3.18-rc0 2014-10-11 20:29:01 -04:00
zorro
Kconfig
Makefile