Commit 8d5732f4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: pwm: 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 pwm 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 c01e16e3
...@@ -196,7 +196,7 @@ static int gb_pwm_connection_init(struct gb_connection *connection) ...@@ -196,7 +196,7 @@ static int gb_pwm_connection_init(struct gb_connection *connection)
pwm = &pwmc->chip; pwm = &pwmc->chip;
pwm->dev = &connection->dev; pwm->dev = &connection->bundle->dev;
pwm->ops = &gb_pwm_ops; pwm->ops = &gb_pwm_ops;
pwm->base = -1; /* Allocate base dynamically */ pwm->base = -1; /* Allocate base dynamically */
pwm->npwm = pwmc->pwm_max + 1; pwm->npwm = pwmc->pwm_max + 1;
...@@ -204,7 +204,8 @@ static int gb_pwm_connection_init(struct gb_connection *connection) ...@@ -204,7 +204,8 @@ static int gb_pwm_connection_init(struct gb_connection *connection)
ret = pwmchip_add(pwm); ret = pwmchip_add(pwm);
if (ret) { if (ret) {
dev_err(&connection->dev, "failed to register PWM: %d\n", ret); dev_err(&connection->bundle->dev,
"failed to register PWM: %d\n", ret);
goto out_err; goto out_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