Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9baa0cc authored by Scott Ling's avatar Scott Ling Committed by Mark Brown
Browse files

ASoC: wm0010: Remove boot_done variable as no longer required.



Remove the boot_done counter variable and check the wm0010 state
variable instead.

Signed-off-by: default avatarScott Ling <scott.ling@wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 6f0c0580
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -97,7 +97,6 @@ struct wm0010_priv {


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


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


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


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