aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-02-05 02:58:48 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-03-02 14:49:58 -0500
commitdaa939db21108c951765ce1089d423fd90f8a447 (patch)
tree5a72d86953be00cf68185c85ca2345e539b213a9
parent80f4944ec2aecb64c213944f78745787e363672a (diff)
[media] media: radio: assign wait_for_completion_timeout to appropriately typed var
wait_for_completion_timeout() returns unsigned long not int. This assigns the return value to an appropriately typed variable (also helps keep static code checkers happy). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/radio/radio-wl1273.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
index b8f36445516b..571c7f6de439 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -347,6 +347,7 @@ static int wl1273_fm_set_tx_freq(struct wl1273_device *radio, unsigned int freq)
347{ 347{
348 struct wl1273_core *core = radio->core; 348 struct wl1273_core *core = radio->core;
349 int r = 0; 349 int r = 0;
350 unsigned long t;
350 351
351 if (freq < WL1273_BAND_TX_LOW) { 352 if (freq < WL1273_BAND_TX_LOW) {
352 dev_err(radio->dev, 353 dev_err(radio->dev,
@@ -378,11 +379,11 @@ static int wl1273_fm_set_tx_freq(struct wl1273_device *radio, unsigned int freq)
378 reinit_completion(&radio->busy); 379 reinit_completion(&radio->busy);
379 380
380 /* wait for the FR IRQ */ 381 /* wait for the FR IRQ */
381 r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000)); 382 t = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000));
382 if (!r) 383 if (!t)
383 return -ETIMEDOUT; 384 return -ETIMEDOUT;
384 385
385 dev_dbg(radio->dev, "WL1273_CHANL_SET: %d\n", r); 386 dev_dbg(radio->dev, "WL1273_CHANL_SET: %lu\n", t);
386 387
387 /* Enable the output power */ 388 /* Enable the output power */
388 r = core->write(core, WL1273_POWER_ENB_SET, 1); 389 r = core->write(core, WL1273_POWER_ENB_SET, 1);
@@ -392,12 +393,12 @@ static int wl1273_fm_set_tx_freq(struct wl1273_device *radio, unsigned int freq)
392 reinit_completion(&radio->busy); 393 reinit_completion(&radio->busy);
393 394
394 /* wait for the POWER_ENB IRQ */ 395 /* wait for the POWER_ENB IRQ */
395 r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(1000)); 396 t = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(1000));
396 if (!r) 397 if (!t)
397 return -ETIMEDOUT; 398 return -ETIMEDOUT;
398 399
399 radio->tx_frequency = freq; 400 radio->tx_frequency = freq;
400 dev_dbg(radio->dev, "WL1273_POWER_ENB_SET: %d\n", r); 401 dev_dbg(radio->dev, "WL1273_POWER_ENB_SET: %lu\n", t);
401 402
402 return 0; 403 return 0;
403} 404}
@@ -406,6 +407,7 @@ static int wl1273_fm_set_rx_freq(struct wl1273_device *radio, unsigned int freq)
406{ 407{
407 struct wl1273_core *core = radio->core; 408 struct wl1273_core *core = radio->core;
408 int r, f; 409 int r, f;
410 unsigned long t;
409 411
410 if (freq < radio->rangelow) { 412 if (freq < radio->rangelow) {
411 dev_err(radio->dev, 413 dev_err(radio->dev,
@@ -446,8 +448,8 @@ static int wl1273_fm_set_rx_freq(struct wl1273_device *radio, unsigned int freq)
446 448
447 reinit_completion(&radio->busy); 449 reinit_completion(&radio->busy);
448 450
449 r = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000)); 451 t = wait_for_completion_timeout(&radio->busy, msecs_to_jiffies(2000));
450 if (!r) { 452 if (!t) {
451 dev_err(radio->dev, "%s: TIMEOUT\n", __func__); 453 dev_err(radio->dev, "%s: TIMEOUT\n", __func__);
452 return -ETIMEDOUT; 454 return -ETIMEDOUT;
453 } 455 }