greybus: control: Print bundle-id in print messages

The new power management specific operations added to the control
protocol do not print the bundle-id in the error messages and it is not
possible to identify which bundle-id the operation failed for.

Fix that and do minor rewriting of the print messages to make them more
readable.

Tested on EVT 2.0 with gpbridge-test module.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Sandeep Patil <sspatil@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Viresh Kumar 2016-07-21 22:41:05 -07:00 committed by Greg Kroah-Hartman
parent e514dec730
commit 553cba82b1
1 changed files with 16 additions and 14 deletions

View File

@ -259,14 +259,14 @@ int gb_control_bundle_suspend(struct gb_control *control, u8 bundle_id)
GB_CONTROL_TYPE_BUNDLE_SUSPEND, &request,
sizeof(request), &response, sizeof(response));
if (ret) {
dev_err(&control->dev,
"failed to send bundle suspend: %d\n", ret);
dev_err(&control->dev, "failed to send bundle %u suspend: %d\n",
bundle_id, ret);
return ret;
}
if (response.status != GB_CONTROL_BUNDLE_PM_OK) {
dev_err(&control->dev,
"bundle error while suspending: %d\n", response.status);
dev_err(&control->dev, "failed to suspend bundle %u: %d\n",
bundle_id, response.status);
return gb_control_bundle_pm_status_map(response.status);
}
@ -284,14 +284,14 @@ int gb_control_bundle_resume(struct gb_control *control, u8 bundle_id)
GB_CONTROL_TYPE_BUNDLE_RESUME, &request,
sizeof(request), &response, sizeof(response));
if (ret) {
dev_err(&control->dev,
"failed to send bundle resume: %d\n", ret);
dev_err(&control->dev, "failed to send bundle %u resume: %d\n",
bundle_id, ret);
return ret;
}
if (response.status != GB_CONTROL_BUNDLE_PM_OK) {
dev_err(&control->dev,
"bundle error while resuming: %d\n", response.status);
dev_err(&control->dev, "failed to resume bundle %u: %d\n",
bundle_id, response.status);
return gb_control_bundle_pm_status_map(response.status);
}
@ -310,13 +310,14 @@ int gb_control_bundle_deactivate(struct gb_control *control, u8 bundle_id)
sizeof(request), &response, sizeof(response));
if (ret) {
dev_err(&control->dev,
"failed to send bundle deactivate: %d\n", ret);
"failed to send bundle %u deactivate: %d\n", bundle_id,
ret);
return ret;
}
if (response.status != GB_CONTROL_BUNDLE_PM_OK) {
dev_err(&control->dev,
"bundle error while deactivating: %d\n", response.status);
dev_err(&control->dev, "failed to deactivate bundle %u: %d\n",
bundle_id, response.status);
return gb_control_bundle_pm_status_map(response.status);
}
@ -338,13 +339,14 @@ int gb_control_bundle_activate(struct gb_control *control, u8 bundle_id)
sizeof(request), &response, sizeof(response));
if (ret) {
dev_err(&control->dev,
"failed to send bundle activate: %d\n", ret);
"failed to send bundle %u activate: %d\n", bundle_id,
ret);
return ret;
}
if (response.status != GB_CONTROL_BUNDLE_PM_OK) {
dev_err(&control->dev,
"bundle error while activating: %d\n", response.status);
dev_err(&control->dev, "failed to activate bundle %u: %d\n",
bundle_id, response.status);
return gb_control_bundle_pm_status_map(response.status);
}