diff options
author | Sarangdhar Joshi <spjoshi@codeaurora.org> | 2017-01-24 18:13:01 -0500 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2017-02-06 16:06:13 -0500 |
commit | 5e6533f72ce849bf49aaee96429bbe3558789d08 (patch) | |
tree | e48cceaf2dd943c0ad5b48cb3b7a850ff9f406e0 | |
parent | 7a20c64ddb3deeb08bbe1ca8e9bcafd3241a5e0e (diff) |
remoteproc: Modify the function names
The functions rproc_add_virtio_devices() and rproc_fw_config_virtio()
are reduced to trigger auto-boot only. Modify these function names and
related comments to reflect their current state.
This patch does not add any functional change.
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index a112f5969d4a..3dabb20b8d5d 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c | |||
@@ -961,14 +961,14 @@ clean_up: | |||
961 | } | 961 | } |
962 | 962 | ||
963 | /* | 963 | /* |
964 | * take a firmware and look for virtio devices to register. | 964 | * take a firmware and boot it up. |
965 | * | 965 | * |
966 | * Note: this function is called asynchronously upon registration of the | 966 | * Note: this function is called asynchronously upon registration of the |
967 | * remote processor (so we must wait until it completes before we try | 967 | * remote processor (so we must wait until it completes before we try |
968 | * to unregister the device. one other option is just to use kref here, | 968 | * to unregister the device. one other option is just to use kref here, |
969 | * that might be cleaner). | 969 | * that might be cleaner). |
970 | */ | 970 | */ |
971 | static void rproc_fw_config_virtio(const struct firmware *fw, void *context) | 971 | static void rproc_auto_boot_callback(const struct firmware *fw, void *context) |
972 | { | 972 | { |
973 | struct rproc *rproc = context; | 973 | struct rproc *rproc = context; |
974 | 974 | ||
@@ -977,21 +977,17 @@ static void rproc_fw_config_virtio(const struct firmware *fw, void *context) | |||
977 | release_firmware(fw); | 977 | release_firmware(fw); |
978 | } | 978 | } |
979 | 979 | ||
980 | static int rproc_add_virtio_devices(struct rproc *rproc) | 980 | static int rproc_trigger_auto_boot(struct rproc *rproc) |
981 | { | 981 | { |
982 | int ret; | 982 | int ret; |
983 | 983 | ||
984 | /* | 984 | /* |
985 | * We must retrieve early virtio configuration info from | ||
986 | * the firmware (e.g. whether to register a virtio device, | ||
987 | * what virtio features does it support, ...). | ||
988 | * | ||
989 | * We're initiating an asynchronous firmware loading, so we can | 985 | * We're initiating an asynchronous firmware loading, so we can |
990 | * be built-in kernel code, without hanging the boot process. | 986 | * be built-in kernel code, without hanging the boot process. |
991 | */ | 987 | */ |
992 | ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, | 988 | ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG, |
993 | rproc->firmware, &rproc->dev, GFP_KERNEL, | 989 | rproc->firmware, &rproc->dev, GFP_KERNEL, |
994 | rproc, rproc_fw_config_virtio); | 990 | rproc, rproc_auto_boot_callback); |
995 | if (ret < 0) | 991 | if (ret < 0) |
996 | dev_err(&rproc->dev, "request_firmware_nowait err: %d\n", ret); | 992 | dev_err(&rproc->dev, "request_firmware_nowait err: %d\n", ret); |
997 | 993 | ||
@@ -1287,7 +1283,7 @@ int rproc_add(struct rproc *rproc) | |||
1287 | 1283 | ||
1288 | /* if rproc is marked always-on, request it to boot */ | 1284 | /* if rproc is marked always-on, request it to boot */ |
1289 | if (rproc->auto_boot) { | 1285 | if (rproc->auto_boot) { |
1290 | ret = rproc_add_virtio_devices(rproc); | 1286 | ret = rproc_trigger_auto_boot(rproc); |
1291 | if (ret < 0) | 1287 | if (ret < 0) |
1292 | return ret; | 1288 | return ret; |
1293 | } | 1289 | } |