Merge "dwc3-msm: Fix dwc3_drd_state_string for undefined state"
This commit is contained in:
commit
0434b31d56
1 changed files with 2 additions and 1 deletions
|
@ -145,6 +145,7 @@ enum dwc3_drd_state {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *const state_names[] = {
|
static const char *const state_names[] = {
|
||||||
|
[DRD_STATE_UNDEFINED] = "undefined",
|
||||||
[DRD_STATE_IDLE] = "idle",
|
[DRD_STATE_IDLE] = "idle",
|
||||||
[DRD_STATE_PERIPHERAL] = "peripheral",
|
[DRD_STATE_PERIPHERAL] = "peripheral",
|
||||||
[DRD_STATE_PERIPHERAL_SUSPEND] = "peripheral_suspend",
|
[DRD_STATE_PERIPHERAL_SUSPEND] = "peripheral_suspend",
|
||||||
|
@ -155,7 +156,7 @@ static const char *const state_names[] = {
|
||||||
static const char *dwc3_drd_state_string(enum dwc3_drd_state state)
|
static const char *dwc3_drd_state_string(enum dwc3_drd_state state)
|
||||||
{
|
{
|
||||||
if (state < 0 || state >= ARRAY_SIZE(state_names))
|
if (state < 0 || state >= ARRAY_SIZE(state_names))
|
||||||
return "UNDEFINED";
|
return "UNKNOWN";
|
||||||
|
|
||||||
return state_names[state];
|
return state_names[state];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue