Skip to content

Commit

Permalink
[media] af9035: Use usleep_range() in fc0011 support code
Browse files Browse the repository at this point in the history
Use usleep_range() instead of msleep() to improve power saving opportunities.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Michael Büsch authored and Mauro Carvalho Chehab committed Apr 9, 2012
1 parent c421d5c commit de2bec5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/dvb/dvb-usb/af9035.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ static int af9035_fc0011_tuner_callback(struct dvb_usb_device *d,
err = af9035_wr_reg_mask(d, 0xd8d1, 1, 1);
if (err)
return err;
msleep(10);
usleep_range(10000, 50000);
break;
case FC0011_FE_CALLBACK_RESET:
err = af9035_wr_reg(d, 0xd8e9, 1);
Expand All @@ -602,11 +602,11 @@ static int af9035_fc0011_tuner_callback(struct dvb_usb_device *d,
err = af9035_wr_reg(d, 0xd8e7, 1);
if (err)
return err;
msleep(10);
usleep_range(10000, 20000);
err = af9035_wr_reg(d, 0xd8e7, 0);
if (err)
return err;
msleep(10);
usleep_range(10000, 20000);
break;
default:
return -EINVAL;
Expand Down

0 comments on commit de2bec5

Please sign in to comment.