[media] fc0011: use usleep_range()
authorMichael Büsch <m@bues.ch>
Tue, 3 Apr 2012 08:08:45 +0000 (05:08 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 9 Apr 2012 17:53:47 +0000 (14:53 -0300)
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>
drivers/media/common/tuners/fc0011.c

index 7842a4eee3d734fbca25dc0384a7870cfcdee355..d43a5a29ed293d866baaf7b5f309f309c4194e94 100644 (file)
@@ -167,7 +167,7 @@ static int fc0011_vcocal_read(struct fc0011_priv *priv, u8 *value)
        err = fc0011_writereg(priv, FC11_REG_VCOCAL, FC11_VCOCAL_RUN);
        if (err)
                return err;
-       msleep(10);
+       usleep_range(10000, 20000);
        err = fc0011_readreg(priv, FC11_REG_VCOCAL, value);
        if (err)
                return err;
@@ -423,7 +423,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
        err = fc0011_vcocal_read(priv, NULL);
        if (err)
                return err;
-       msleep(10);
+       usleep_range(10000, 50000);
 
        err = fc0011_readreg(priv, FC11_REG_RCCAL, &regs[FC11_REG_RCCAL]);
        if (err)