| .. | .. |
|---|
| 10 | 10 | #include <linux/jiffies.h> |
|---|
| 11 | 11 | #include <linux/mutex.h> |
|---|
| 12 | 12 | #include <linux/workqueue.h> |
|---|
| 13 | +#include <linux/greybus.h> |
|---|
| 13 | 14 | |
|---|
| 14 | | -#include "greybus.h" |
|---|
| 15 | 15 | #include "firmware.h" |
|---|
| 16 | 16 | |
|---|
| 17 | 17 | /* Timeout, in jiffies, within which the next request must be received */ |
|---|
| .. | .. |
|---|
| 86 | 86 | } |
|---|
| 87 | 87 | |
|---|
| 88 | 88 | static void gb_bootrom_set_timeout(struct gb_bootrom *bootrom, |
|---|
| 89 | | - enum next_request_type next, unsigned long timeout) |
|---|
| 89 | + enum next_request_type next, |
|---|
| 90 | + unsigned long timeout) |
|---|
| 90 | 91 | { |
|---|
| 91 | 92 | bootrom->next_request = next; |
|---|
| 92 | 93 | schedule_delayed_work(&bootrom->dwork, msecs_to_jiffies(timeout)); |
|---|
| .. | .. |
|---|
| 175 | 176 | firmware_name); |
|---|
| 176 | 177 | |
|---|
| 177 | 178 | rc = request_firmware(&bootrom->fw, firmware_name, |
|---|
| 178 | | - &connection->bundle->dev); |
|---|
| 179 | + &connection->bundle->dev); |
|---|
| 179 | 180 | if (rc) { |
|---|
| 180 | 181 | dev_err(&connection->bundle->dev, |
|---|
| 181 | 182 | "failed to find %s firmware (%d)\n", firmware_name, rc); |
|---|
| .. | .. |
|---|
| 274 | 275 | |
|---|
| 275 | 276 | if (offset >= fw->size || size > fw->size - offset) { |
|---|
| 276 | 277 | dev_warn(dev, "bad firmware request (offs = %u, size = %u)\n", |
|---|
| 277 | | - offset, size); |
|---|
| 278 | + offset, size); |
|---|
| 278 | 279 | ret = -EINVAL; |
|---|
| 279 | 280 | goto unlock; |
|---|
| 280 | 281 | } |
|---|
| .. | .. |
|---|
| 387 | 388 | sizeof(response)); |
|---|
| 388 | 389 | if (ret) { |
|---|
| 389 | 390 | dev_err(&bundle->dev, |
|---|
| 390 | | - "failed to get protocol version: %d\n", |
|---|
| 391 | | - ret); |
|---|
| 391 | + "failed to get protocol version: %d\n", |
|---|
| 392 | + ret); |
|---|
| 392 | 393 | return ret; |
|---|
| 393 | 394 | } |
|---|
| 394 | 395 | |
|---|
| 395 | 396 | if (response.major > request.major) { |
|---|
| 396 | 397 | dev_err(&bundle->dev, |
|---|
| 397 | | - "unsupported major protocol version (%u > %u)\n", |
|---|
| 398 | | - response.major, request.major); |
|---|
| 398 | + "unsupported major protocol version (%u > %u)\n", |
|---|
| 399 | + response.major, request.major); |
|---|
| 399 | 400 | return -ENOTSUPP; |
|---|
| 400 | 401 | } |
|---|
| 401 | 402 | |
|---|
| .. | .. |
|---|
| 403 | 404 | bootrom->protocol_minor = response.minor; |
|---|
| 404 | 405 | |
|---|
| 405 | 406 | dev_dbg(&bundle->dev, "%s - %u.%u\n", __func__, response.major, |
|---|
| 406 | | - response.minor); |
|---|
| 407 | + response.minor); |
|---|
| 407 | 408 | |
|---|
| 408 | 409 | return 0; |
|---|
| 409 | 410 | } |
|---|
| 410 | 411 | |
|---|
| 411 | 412 | static int gb_bootrom_probe(struct gb_bundle *bundle, |
|---|
| 412 | | - const struct greybus_bundle_id *id) |
|---|
| 413 | + const struct greybus_bundle_id *id) |
|---|
| 413 | 414 | { |
|---|
| 414 | 415 | struct greybus_descriptor_cport *cport_desc; |
|---|
| 415 | 416 | struct gb_connection *connection; |
|---|
| .. | .. |
|---|
| 428 | 429 | return -ENOMEM; |
|---|
| 429 | 430 | |
|---|
| 430 | 431 | connection = gb_connection_create(bundle, |
|---|
| 431 | | - le16_to_cpu(cport_desc->id), |
|---|
| 432 | | - gb_bootrom_request_handler); |
|---|
| 432 | + le16_to_cpu(cport_desc->id), |
|---|
| 433 | + gb_bootrom_request_handler); |
|---|
| 433 | 434 | if (IS_ERR(connection)) { |
|---|
| 434 | 435 | ret = PTR_ERR(connection); |
|---|
| 435 | 436 | goto err_free_bootrom; |
|---|
| .. | .. |
|---|
| 466 | 467 | NULL, 0); |
|---|
| 467 | 468 | if (ret) { |
|---|
| 468 | 469 | dev_err(&connection->bundle->dev, |
|---|
| 469 | | - "failed to send AP READY: %d\n", ret); |
|---|
| 470 | + "failed to send AP READY: %d\n", ret); |
|---|
| 470 | 471 | goto err_cancel_timeout; |
|---|
| 471 | 472 | } |
|---|
| 472 | 473 | |
|---|