Skip to content

Commit

Permalink
ASoC: wm0010: Remove boot_done variable as no longer required.
Browse files Browse the repository at this point in the history
Remove the boot_done counter variable and check the wm0010 state
variable instead.

Signed-off-by: Scott Ling <scott.ling@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Scott Ling authored and Mark Brown committed Nov 6, 2012
1 parent 6f0c058 commit f9baa0c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/codecs/wm0010.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ struct wm0010_priv {

enum wm0010_state state;
bool boot_failed;
int boot_done;
bool ready;
bool pll_running;
int max_spi_freq;
Expand Down Expand Up @@ -234,7 +233,7 @@ static void wm0010_boot_xfer_complete(void *data)
break;

case 0x55555555:
if (wm0010->boot_done == 0)
if (wm0010->state < WM0010_STAGE2)
break;
dev_err(codec->dev,
"%d: ROM bootloader running in stage 2\n", i);
Expand Down Expand Up @@ -321,7 +320,6 @@ static void wm0010_boot_xfer_complete(void *data)
break;
}

wm0010->boot_done++;
if (xfer->done)
complete(xfer->done);
}
Expand Down Expand Up @@ -544,7 +542,6 @@ static int wm0010_boot(struct snd_soc_codec *codec)

rec = (const struct dfw_binrec *)fw->data;
offset = 0;
wm0010->boot_done = 0;
wm0010->boot_failed = false;
BUG_ON(!list_empty(&xfer_list));
init_completion(&done);
Expand Down

0 comments on commit f9baa0c

Please sign in to comment.