greybus: audio: use the bundle struct device instead of the connector
authorGreg Kroah-Hartman <gregkh@google.com>
Wed, 14 Oct 2015 18:16:49 +0000 (11:16 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 15 Oct 2015 16:19:15 +0000 (09:19 -0700)
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: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/staging/greybus/audio.c

index 6754c907cd6ef9bb84b1291f6912ada33b716db2..684229ccab6ce701f56a31b6a45d81a2e47b4830 100644 (file)
@@ -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;