diff options
author | Vaibhav Hiremath <vaibhav.hiremath@linaro.org> | 2016-05-24 18:32:02 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-25 22:36:45 -0700 |
commit | c61a8b49846ecc11f7959f573b9548f859bc73a5 (patch) | |
tree | 085883752dc29e056ce7987c82f9dd75b1d830a3 /drivers/staging/greybus/arche-platform.c | |
parent | 91a8030f781d27e84661c4a4edf1e108bfc1c594 (diff) |
greybus: arche-platform: Make fw_flashing_seq() return error
Make arche_platform_fw_flashing_seq() return error value, needed
later when we add clock enable support for FW flashing.
Testing Done: Tested on EVT1.5 platform.
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Tested-by: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/arche-platform.c')
-rw-r--r-- | drivers/staging/greybus/arche-platform.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index 4af34988e197..a8e36e1141fd 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -335,10 +335,10 @@ static int arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdat /* * Requires arche_pdata->platform_state_mutex to be held */ -static void arche_platform_fw_flashing_seq(struct arche_platform_drvdata *arche_pdata) +static int arche_platform_fw_flashing_seq(struct arche_platform_drvdata *arche_pdata) { if (arche_pdata->state == ARCHE_PLATFORM_STATE_FW_FLASHING) - return; + return 0; dev_info(arche_pdata->dev, "Switching to FW flashing state\n"); @@ -353,6 +353,7 @@ static void arche_platform_fw_flashing_seq(struct arche_platform_drvdata *arche_ arche_platform_set_state(arche_pdata, ARCHE_PLATFORM_STATE_FW_FLASHING); + return 0; } /* @@ -424,7 +425,9 @@ static ssize_t state_store(struct device *dev, arche_platform_poweroff_seq(arche_pdata); - arche_platform_fw_flashing_seq(arche_pdata); + ret = arche_platform_fw_flashing_seq(arche_pdata); + if (ret) + goto exit; device_for_each_child(arche_pdata->dev, NULL, apb_fw_flashing_state); } else { |