forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/staging/greybus/bootrom.c
....@@ -10,8 +10,8 @@
1010 #include <linux/jiffies.h>
1111 #include <linux/mutex.h>
1212 #include <linux/workqueue.h>
13
+#include <linux/greybus.h>
1314
14
-#include "greybus.h"
1515 #include "firmware.h"
1616
1717 /* Timeout, in jiffies, within which the next request must be received */
....@@ -86,7 +86,8 @@
8686 }
8787
8888 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)
9091 {
9192 bootrom->next_request = next;
9293 schedule_delayed_work(&bootrom->dwork, msecs_to_jiffies(timeout));
....@@ -175,7 +176,7 @@
175176 firmware_name);
176177
177178 rc = request_firmware(&bootrom->fw, firmware_name,
178
- &connection->bundle->dev);
179
+ &connection->bundle->dev);
179180 if (rc) {
180181 dev_err(&connection->bundle->dev,
181182 "failed to find %s firmware (%d)\n", firmware_name, rc);
....@@ -274,7 +275,7 @@
274275
275276 if (offset >= fw->size || size > fw->size - offset) {
276277 dev_warn(dev, "bad firmware request (offs = %u, size = %u)\n",
277
- offset, size);
278
+ offset, size);
278279 ret = -EINVAL;
279280 goto unlock;
280281 }
....@@ -387,15 +388,15 @@
387388 sizeof(response));
388389 if (ret) {
389390 dev_err(&bundle->dev,
390
- "failed to get protocol version: %d\n",
391
- ret);
391
+ "failed to get protocol version: %d\n",
392
+ ret);
392393 return ret;
393394 }
394395
395396 if (response.major > request.major) {
396397 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);
399400 return -ENOTSUPP;
400401 }
401402
....@@ -403,13 +404,13 @@
403404 bootrom->protocol_minor = response.minor;
404405
405406 dev_dbg(&bundle->dev, "%s - %u.%u\n", __func__, response.major,
406
- response.minor);
407
+ response.minor);
407408
408409 return 0;
409410 }
410411
411412 static int gb_bootrom_probe(struct gb_bundle *bundle,
412
- const struct greybus_bundle_id *id)
413
+ const struct greybus_bundle_id *id)
413414 {
414415 struct greybus_descriptor_cport *cport_desc;
415416 struct gb_connection *connection;
....@@ -428,8 +429,8 @@
428429 return -ENOMEM;
429430
430431 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);
433434 if (IS_ERR(connection)) {
434435 ret = PTR_ERR(connection);
435436 goto err_free_bootrom;
....@@ -466,7 +467,7 @@
466467 NULL, 0);
467468 if (ret) {
468469 dev_err(&connection->bundle->dev,
469
- "failed to send AP READY: %d\n", ret);
470
+ "failed to send AP READY: %d\n", ret);
470471 goto err_cancel_timeout;
471472 }
472473