[PATCH] keyboard: adp5589-keys: Attach device to the gpio chip

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

 



Currently the device struct is not attached to the gpio chip struct.

This causes trouble if the GPIO pins are used in a device tree, because
the device struct is heavily used during gpio chip lookup and matching.

Signed-off-by: Richard Röjfors <richard.rojfors@xxxxxxxxx>
---
diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index 4d446d5..63a8c85 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -522,6 +522,7 @@ static int adp5589_gpio_add(struct adp5589_kpad *kpad)
 	kpad->gc.base = gpio_data->gpio_start;
 	kpad->gc.label = kpad->client->name;
 	kpad->gc.owner = THIS_MODULE;
+	kpad->gc.dev = dev;
 
 	mutex_init(&kpad->gpio_lock);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux