diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2015-10-14 11:18:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-10-15 09:19:15 -0700 |
commit | 8d5732f4be9411ddf9e6dc6b4d761f3b06999d94 (patch) | |
tree | cfd8992f1634f0da8135a673c62b7e1cfc754ccc /drivers/staging/greybus/pwm.c | |
parent | c01e16e3cb120938db87af91248e91f3552a1b73 (diff) | |
download | linux-8d5732f4be9411ddf9e6dc6b4d761f3b06999d94.tar.bz2 |
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: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/pwm.c')
-rw-r--r-- | drivers/staging/greybus/pwm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/greybus/pwm.c b/drivers/staging/greybus/pwm.c index d91905f0f7b3..c3a3a9dfc6b4 100644 --- a/drivers/staging/greybus/pwm.c +++ b/drivers/staging/greybus/pwm.c @@ -196,7 +196,7 @@ static int gb_pwm_connection_init(struct gb_connection *connection) pwm = &pwmc->chip; - pwm->dev = &connection->dev; + pwm->dev = &connection->bundle->dev; pwm->ops = &gb_pwm_ops; pwm->base = -1; /* Allocate base dynamically */ pwm->npwm = pwmc->pwm_max + 1; @@ -204,7 +204,8 @@ static int gb_pwm_connection_init(struct gb_connection *connection) ret = pwmchip_add(pwm); 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; } |