Merge "mhi: core: move mhi_states_transition_str out of stack"

This commit is contained in:
Linux Build Service Account 2017-09-22 17:26:55 -07:00 committed by Gerrit - the friendly Code Review server
commit 242aa79d68

View file

@ -18,10 +18,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
const char *state_transition_str(enum STATE_TRANSITION state)
{
static const char * const
mhi_states_transition_str[STATE_TRANSITION_MAX] = {
static const char * const mhi_states_transition_str[STATE_TRANSITION_MAX] = {
[STATE_TRANSITION_RESET] = "RESET",
[STATE_TRANSITION_READY] = "READY",
[STATE_TRANSITION_M0] = "M0",
@ -38,6 +35,8 @@ const char *state_transition_str(enum STATE_TRANSITION state)
[STATE_TRANSITION_SYS_ERR] = "SYS_ERR",
};
const char *state_transition_str(enum STATE_TRANSITION state)
{
return (state < STATE_TRANSITION_MAX) ?
mhi_states_transition_str[state] : "Invalid";
}