diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2015-10-14 11:17:29 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-10-15 09:19:15 -0700 |
commit | 0a72bd36df947855d7e546ac2e91972860f6894b (patch) | |
tree | 35b27fcfb702d5078bd6a14972feb8bb66a675b3 /drivers/staging/greybus/firmware.c | |
parent | greybus: audio: use the bundle struct device instead of the connector (diff) | |
download | linux-0a72bd36df947855d7e546ac2e91972860f6894b.tar.gz linux-0a72bd36df947855d7e546ac2e91972860f6894b.tar.bz2 linux-0a72bd36df947855d7e546ac2e91972860f6894b.zip |
greybus: firmware: 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 firmware 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/firmware.c')
-rw-r--r-- | drivers/staging/greybus/firmware.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/staging/greybus/firmware.c b/drivers/staging/greybus/firmware.c index e04ed6bffcf5..b16f13318be4 100644 --- a/drivers/staging/greybus/firmware.c +++ b/drivers/staging/greybus/firmware.c @@ -43,7 +43,8 @@ static int download_firmware(struct gb_firmware *firmware, u8 stage) intf->unipro_mfg_id, intf->unipro_prod_id, intf->ara_vend_id, intf->ara_prod_id, stage); - return request_firmware(&firmware->fw, firmware_name, &connection->dev); + return request_firmware(&firmware->fw, firmware_name, + &connection->bundle->dev); } static int gb_firmware_size_request(struct gb_operation *op) @@ -52,7 +53,7 @@ static int gb_firmware_size_request(struct gb_operation *op) struct gb_firmware *firmware = connection->private; struct gb_firmware_size_request *size_request = op->request->payload; struct gb_firmware_size_response *size_response; - struct device *dev = &connection->dev; + struct device *dev = &connection->bundle->dev; int ret; if (op->request->payload_size != sizeof(*size_request)) { @@ -88,7 +89,7 @@ static int gb_firmware_get_firmware(struct gb_operation *op) struct gb_firmware *firmware = connection->private; struct gb_firmware_get_firmware_request *firmware_request = op->request->payload; struct gb_firmware_get_firmware_response *firmware_response; - struct device *dev = &connection->dev; + struct device *dev = &connection->bundle->dev; unsigned int offset, size; if (op->request->payload_size != sizeof(*firmware_request)) { @@ -122,7 +123,7 @@ static int gb_firmware_ready_to_boot(struct gb_operation *op) { struct gb_connection *connection = op->connection; struct gb_firmware_ready_to_boot_request *rtb_request = op->request->payload; - struct device *dev = &connection->dev; + struct device *dev = &connection->bundle->dev; u8 status; if (op->request->payload_size != sizeof(*rtb_request)) { @@ -155,7 +156,7 @@ static int gb_firmware_request_recv(u8 type, struct gb_operation *op) case GB_FIRMWARE_TYPE_READY_TO_BOOT: return gb_firmware_ready_to_boot(op); default: - dev_err(&op->connection->dev, + dev_err(&op->connection->bundle->dev, "unsupported request: %hhu\n", type); return -EINVAL; } @@ -185,7 +186,7 @@ static int gb_firmware_connection_init(struct gb_connection *connection) ret = gb_operation_sync(connection, GB_FIRMWARE_TYPE_AP_READY, NULL, 0, NULL, 0); if (ret) - dev_err(&connection->dev, "Failed to send AP READY (%d)\n", ret); + dev_err(&connection->bundle->dev, "Failed to send AP READY (%d)\n", ret); return 0; } |