mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 08:48:48 +00:00
gpiolib: fix poll(2) support reconfigure on sysfs polarity change
Previously enabled poll(2) support on one edge was never reconfigured when sysfs polarity change was triggered from kernel, because 'struct device *dev' shadowed an earlier definition. Found by sparse, which I should've run much earlier. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3f4724027b
commit
24f3c59e17
@ -858,8 +858,6 @@ int gpio_sysfs_set_active_low(unsigned gpio, int value)
|
||||
desc = &gpio_desc[gpio];
|
||||
|
||||
if (test_bit(FLAG_EXPORT, &desc->flags)) {
|
||||
struct device *dev;
|
||||
|
||||
dev = class_find_device(&gpio_class, NULL, desc, match_export);
|
||||
if (dev == NULL) {
|
||||
status = -ENODEV;
|
||||
|
Loading…
x
Reference in New Issue
Block a user