All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: pca953x: Fix gpio_base may not default to -1
       [not found] <430364938.125965.1391822577770.JavaMail.zimbra@xes-inc.com>
@ 2014-02-08  1:23 ` Aaron Sierra
  2014-02-13 13:04   ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Sierra @ 2014-02-08  1:23 UTC (permalink / raw)
  To: linux-gpio; +Cc: Linus Walleij

If no device tree node existed for a device when CONFIG_OF_GPIO was
defined, then gpio_base would not default to -1.

Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
---
 drivers/gpio/gpio-pca953x.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 948a074..d550d8e 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -627,11 +627,12 @@ pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, u32 *invert)
 	const __be32 *val;
 	int size;
 
+	*gpio_base = -1;
+
 	node = client->dev.of_node;
 	if (node == NULL)
 		return;
 
-	*gpio_base = -1;
 	val = of_get_property(node, "linux,gpio-base", &size);
 	WARN(val, "%s: device-tree property 'linux,gpio-base' is deprecated!", __func__);
 	if (val) {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: pca953x: Fix gpio_base may not default to -1
  2014-02-08  1:23 ` [PATCH] gpio: pca953x: Fix gpio_base may not default to -1 Aaron Sierra
@ 2014-02-13 13:04   ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2014-02-13 13:04 UTC (permalink / raw)
  To: Aaron Sierra; +Cc: linux-gpio

On Sat, Feb 8, 2014 at 2:23 AM, Aaron Sierra <asierra@xes-inc.com> wrote:

> If no device tree node existed for a device when CONFIG_OF_GPIO was
> defined, then gpio_base would not default to -1.
>
> Signed-off-by: Aaron Sierra <asierra@xes-inc.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-13 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <430364938.125965.1391822577770.JavaMail.zimbra@xes-inc.com>
2014-02-08  1:23 ` [PATCH] gpio: pca953x: Fix gpio_base may not default to -1 Aaron Sierra
2014-02-13 13:04   ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.