]> git.karo-electronics.de Git - linux-beck.git/commit
greybus: arche-platform: Rework platform/wd-line state transition logic
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Thu, 5 May 2016 14:34:59 +0000 (15:34 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 5 May 2016 20:49:02 +0000 (13:49 -0700)
commitc4058b7926a44387b1d2480be0f209edb74e7f1c
treec664797ff67bb163f91eec6022183b127a9dc288
parent886aba558b9e63c7025cabfaff8ca17f9fc02985
greybus: arche-platform: Rework platform/wd-line state transition logic

This patch simplifies and improves the readability of the internal state
transition logic of arche platform driver state transition logic by:

1. Making a dedicated function to state-transition the platform code.
2. Condense the decision to swtich states down to a single switch
   statement instead of four separate if/else clauses.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Suggested-by: Alex Elder <elder@linaro.org>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/arche-platform.c