asix-sigma: Init cur_sample_rate

Init the cur_sample_rate to 200kHz. This is now the default sample
rate for the ASIX Sigma if no other is specified by -c samplerate=N
on the command line. Without this change, the driver would crash on
SIGFPE because a division by zero would happen.

Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
Marek Vasut 2014-04-25 18:03:47 +02:00 committed by Bert Vermeulen
parent 1e23158b93
commit 23b886bc40
1 changed files with 1 additions and 1 deletions

View File

@ -360,7 +360,7 @@ static GSList *scan(GSList *options)
sr_info("Found ASIX SIGMA - Serial: %s", serial_txt); sr_info("Found ASIX SIGMA - Serial: %s", serial_txt);
devc->cur_samplerate = 0; devc->cur_samplerate = samplerates[0];
devc->period_ps = 0; devc->period_ps = 0;
devc->limit_msec = 0; devc->limit_msec = 0;
devc->cur_firmware = -1; devc->cur_firmware = -1;