From c7eb46e459f2a05fa52656ae9d767aa498482ecf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 14 Oct 2015 11:17:55 -0700 Subject: [PATCH] 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 Reviewed-by: Alex Elder --- drivers/staging/greybus/gpio.c | 11 ++++++----- 1 file 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; } -- 2.20.1