Commit c7eb46e4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
parent 0a72bd36
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment