Commit 283dc01f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: audio: 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 audio 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 b2a637d7
......@@ -341,13 +341,14 @@ static int gb_i2s_mgmt_report_event_recv(u8 type, struct gb_operation *op)
char *event_name;
if (type != GB_I2S_MGMT_TYPE_REPORT_EVENT) {
dev_err(&connection->dev, "Invalid request type: %d\n",
dev_err(&connection->bundle->dev, "Invalid request type: %d\n",
type);
return -EINVAL;
}
if (op->request->payload_size < sizeof(*req)) {
dev_err(&connection->dev, "Short request received (%zu < %zu)\n",
dev_err(&connection->bundle->dev,
"Short request received (%zu < %zu)\n",
op->request->payload_size, sizeof(*req));
return -EINVAL;
}
......@@ -385,12 +386,12 @@ static int gb_i2s_mgmt_report_event_recv(u8 type, struct gb_operation *op)
event_name = "DATA_LEN";
break;
default:
dev_warn(&connection->dev, "Unknown I2S Event received: %d\n",
req->event);
dev_warn(&connection->bundle->dev,
"Unknown I2S Event received: %d\n", req->event);
return -EINVAL;
}
dev_warn(&connection->dev, "I2S Event received: %d - '%s'\n",
dev_warn(&connection->bundle->dev, "I2S Event received: %d - '%s'\n",
req->event, event_name);
return 0;
......
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