diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2016-07-21 18:09:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-07-21 18:54:11 -0700 |
commit | f5c93dea8fb7daf5ec26176caa791719895cd28e (patch) | |
tree | a73192ae36861f5312bf72264b7c520e8c754016 /drivers/staging/greybus/core.c | |
parent | greybus: control: suppress bundle_activate() for bootrom (diff) | |
download | linux-dev-f5c93dea8fb7daf5ec26176caa791719895cd28e.tar.xz linux-dev-f5c93dea8fb7daf5ec26176caa791719895cd28e.zip |
greybus: pm: add error handling to bundle activation
The firmware now keeps the underlying hardware disabled until
receiving the first Bundle Activate request. Additionally: requesting
transition to a state the bundle is already in is no longer an error.
We can now add proper error handling to the bundle activate call.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/core.c')
-rw-r--r-- | drivers/staging/greybus/core.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 8c77d6cb3919..1049e9c0edb0 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -181,12 +181,11 @@ static int greybus_probe(struct device *dev) return retval; } - /* - * FIXME: We need to perform error handling on bundle activate call - * below when firmware is ready. We just allow the activate operation to - * fail for now since bundle may be in active already. - */ - gb_control_bundle_activate(bundle->intf->control, bundle->id); + retval = gb_control_bundle_activate(bundle->intf->control, bundle->id); + if (retval) { + pm_runtime_put(&bundle->intf->dev); + return retval; + } /* * Unbound bundle devices are always deactivated. During probe, the |