drivers/usbmisc: remove redundant scope in switch/case

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-03-09 10:04:06 +02:00 committed by Alan Carvalho de Assis
parent ab196aebe4
commit 61e996af33

View File

@ -816,7 +816,6 @@ static void fusb302_worker(FAR void *arg)
switch (priv->state) switch (priv->state)
{ {
case WAITING_FOR_DRP_TOGG_I: case WAITING_FOR_DRP_TOGG_I:
{
if (interrupta & INTERRUPTA_M_TOGDONE) if (interrupta & INTERRUPTA_M_TOGDONE)
{ {
/* What has connected? */ /* What has connected? */
@ -880,7 +879,6 @@ static void fusb302_worker(FAR void *arg)
set_int_mask(priv); set_int_mask(priv);
} }
}
break; break;
case WAITING_FOR_VBUS: case WAITING_FOR_VBUS:
if (interrupt & INTERRUPT_VBUS_OK) if (interrupt & INTERRUPT_VBUS_OK)
@ -927,7 +925,6 @@ static void fusb302_worker(FAR void *arg)
} }
break; break;
case WAITING_FOR_SNK_TOGG_I: case WAITING_FOR_SNK_TOGG_I:
{
if (interrupta & INTERRUPTA_M_TOGDONE) if (interrupta & INTERRUPTA_M_TOGDONE)
{ {
/* Check what has connected? */ /* Check what has connected? */
@ -987,10 +984,8 @@ static void fusb302_worker(FAR void *arg)
set_int_mask(priv); set_int_mask(priv);
} }
}
break; break;
case WAITING_FOR_SRC_TOGG_I: case WAITING_FOR_SRC_TOGG_I:
{
if (interrupta & INTERRUPTA_M_TOGDONE) if (interrupta & INTERRUPTA_M_TOGDONE)
{ {
/* Check what has connected? */ /* Check what has connected? */
@ -1041,10 +1036,8 @@ static void fusb302_worker(FAR void *arg)
set_int_mask(priv); set_int_mask(priv);
} }
}
break; break;
case WAITING_FOR_SRC_DISCONNECT: case WAITING_FOR_SRC_DISCONNECT:
{
if ((priv->connect_status != SRC_DEVICE_CONNECTED) && if ((priv->connect_status != SRC_DEVICE_CONNECTED) &&
(priv->connect_status != AUDIO_ACCESSORY_CONNECTED)) (priv->connect_status != AUDIO_ACCESSORY_CONNECTED))
{ {
@ -1060,10 +1053,8 @@ static void fusb302_worker(FAR void *arg)
{ {
priv->connect_status = BC_LEVEL_CHANGE_REQUSTED; priv->connect_status = BC_LEVEL_CHANGE_REQUSTED;
} }
}
break; break;
case WAITING_FOR_SNK_DISCONNECT: case WAITING_FOR_SNK_DISCONNECT:
{
regval = fusb302_getreg(priv, FUSB302_STATUS0_REG); regval = fusb302_getreg(priv, FUSB302_STATUS0_REG);
if (regval & STATUS0_VBUS_OK) if (regval & STATUS0_VBUS_OK)
/* A USB3 device can cause a spurious VBUS OK here. /* A USB3 device can cause a spurious VBUS OK here.
@ -1085,7 +1076,6 @@ static void fusb302_worker(FAR void *arg)
{ {
priv->connect_status = BC_LEVEL_CHANGE_REQUSTED; priv->connect_status = BC_LEVEL_CHANGE_REQUSTED;
} }
}
break; break;
case WAITING_FOR_HOST_INTERVENTION: case WAITING_FOR_HOST_INTERVENTION:
/* the higher level software has not dealt with the previous /* the higher level software has not dealt with the previous