mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
media: pci: cx25821: Replace mdelay() with msleep()
cx25821_gpio_init(), cx25821_initialize() and cx25821_registers_init() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
71be8dee6b
commit
65155a9bbc
2 changed files with 3 additions and 3 deletions
|
@ -428,7 +428,7 @@ static void cx25821_registers_init(struct cx25821_dev *dev)
|
||||||
tmp |= FLD_USE_ALT_PLL_REF;
|
tmp |= FLD_USE_ALT_PLL_REF;
|
||||||
cx_write(CLK_RST, tmp & ~(FLD_VID_I_CLK_NOE | FLD_VID_J_CLK_NOE));
|
cx_write(CLK_RST, tmp & ~(FLD_VID_I_CLK_NOE | FLD_VID_J_CLK_NOE));
|
||||||
|
|
||||||
mdelay(100);
|
msleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cx25821_sram_channel_setup(struct cx25821_dev *dev,
|
int cx25821_sram_channel_setup(struct cx25821_dev *dev,
|
||||||
|
@ -803,7 +803,7 @@ static void cx25821_initialize(struct cx25821_dev *dev)
|
||||||
cx_write(CLK_DELAY, cx_read(CLK_DELAY) & 0x80000000);
|
cx_write(CLK_DELAY, cx_read(CLK_DELAY) & 0x80000000);
|
||||||
cx_write(PAD_CTRL, 0x12); /* for I2C */
|
cx_write(PAD_CTRL, 0x12); /* for I2C */
|
||||||
cx25821_registers_init(dev); /* init Pecos registers */
|
cx25821_registers_init(dev); /* init Pecos registers */
|
||||||
mdelay(100);
|
msleep(100);
|
||||||
|
|
||||||
for (i = 0; i < VID_CHANNEL_NUM; i++) {
|
for (i = 0; i < VID_CHANNEL_NUM; i++) {
|
||||||
cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
|
cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
|
||||||
|
|
|
@ -88,7 +88,7 @@ void cx25821_gpio_init(struct cx25821_dev *dev)
|
||||||
default:
|
default:
|
||||||
/* set GPIO 5 to select the path for Medusa/Athena */
|
/* set GPIO 5 to select the path for Medusa/Athena */
|
||||||
cx25821_set_gpiopin_logicvalue(dev, 5, 1);
|
cx25821_set_gpiopin_logicvalue(dev, 5, 1);
|
||||||
mdelay(20);
|
msleep(20);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue