--- zzzz-none-000/linux-3.10.107/drivers/media/radio/si470x/radio-si470x-common.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/radio/si470x/radio-si470x-common.c 2021-02-04 17:41:59.000000000 +0000 @@ -208,7 +208,8 @@ static int si470x_set_chan(struct si470x_device *radio, unsigned short chan) { int retval; - bool timed_out = 0; + unsigned long time_left; + bool timed_out = false; /* start tuning */ radio->registers[CHANNEL] &= ~CHANNEL_CHAN; @@ -218,10 +219,10 @@ goto done; /* wait till tune operation has completed */ - INIT_COMPLETION(radio->completion); - retval = wait_for_completion_timeout(&radio->completion, - msecs_to_jiffies(tune_timeout)); - if (!retval) + reinit_completion(&radio->completion); + time_left = wait_for_completion_timeout(&radio->completion, + msecs_to_jiffies(tune_timeout)); + if (time_left == 0) timed_out = true; if ((radio->registers[STATUSRSSI] & STATUSRSSI_STC) == 0) @@ -254,7 +255,7 @@ /* 2: 50 kHz */ default: return 50 * 16; - }; + } } @@ -300,7 +301,8 @@ { int band, retval; unsigned int freq; - bool timed_out = 0; + bool timed_out = false; + unsigned long time_left; /* set band */ if (seek->rangelow || seek->rangehigh) { @@ -341,10 +343,10 @@ return retval; /* wait till tune operation has completed */ - INIT_COMPLETION(radio->completion); - retval = wait_for_completion_timeout(&radio->completion, - msecs_to_jiffies(seek_timeout)); - if (!retval) + reinit_completion(&radio->completion); + time_left = wait_for_completion_timeout(&radio->completion, + msecs_to_jiffies(seek_timeout)); + if (time_left == 0) timed_out = true; if ((radio->registers[STATUSRSSI] & STATUSRSSI_STC) == 0)