summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/gpio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2015-10-14 11:17:55 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2015-10-15 09:19:15 -0700
commitc7eb46e459f2a05fa52656ae9d767aa498482ecf (patch)
tree2ec67960fff116d0e332b4fe712cc0a2e586f909 /drivers/staging/greybus/gpio.c
parent0a72bd36df947855d7e546ac2e91972860f6894b (diff)
greybus: gpio: use the bundle struct device instead of the connector
We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the gpio driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/gpio.c')
-rw-r--r--drivers/staging/greybus/gpio.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c
index 5ac859e1c290..5830dc9b87f3 100644
--- a/drivers/staging/greybus/gpio.c
+++ b/drivers/staging/greybus/gpio.c
@@ -353,7 +353,7 @@ static int gb_gpio_request_recv(u8 type, struct gb_operation *op)
struct irq_desc *desc;
if (type != GB_GPIO_TYPE_IRQ_EVENT) {
- dev_err(&connection->dev,
+ dev_err(&connection->bundle->dev,
"unsupported unsolicited request: %u\n", type);
return -EINVAL;
}
@@ -648,7 +648,7 @@ static int gb_gpio_connection_init(struct gb_connection *connection)
gpio = &ggc->chip;
gpio->label = "greybus_gpio";
- gpio->dev = &connection->dev;
+ gpio->dev = &connection->bundle->dev;
gpio->owner = THIS_MODULE;
gpio->request = gb_gpio_request;
@@ -666,15 +666,16 @@ static int gb_gpio_connection_init(struct gb_connection *connection)
ret = gpiochip_add(gpio);
if (ret) {
- dev_err(&connection->dev, "failed to add gpio chip: %d\n",
- ret);
+ dev_err(&connection->bundle->dev,
+ "failed to add gpio chip: %d\n", ret);
goto err_free_lines;
}
ret = gb_gpio_irqchip_add(gpio, irqc, 0,
handle_level_irq, IRQ_TYPE_NONE);
if (ret) {
- dev_err(&connection->dev, "failed to add irq chip: %d\n", ret);
+ dev_err(&connection->bundle->dev,
+ "failed to add irq chip: %d\n", ret);
goto irqchip_err;
}