media: i2c: adv748x: Remove PAGE_WAIT

The ADV748X_PAGE_WAIT is a fake page to insert arbitrary delays in the
register tables.

Its only usage was removed, so we can remove the handling and simplify
the code.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Kieran Bingham 2019-01-15 09:25:09 -05:00 коммит произвёл Mauro Carvalho Chehab
Родитель ac105ab213
Коммит 16597c2744
2 изменённых файлов: 6 добавлений и 14 удалений

Просмотреть файл

@ -218,20 +218,13 @@ static int adv748x_write_regs(struct adv748x_state *state,
{
int ret;
while (regs->page != ADV748X_PAGE_EOR) {
if (regs->page == ADV748X_PAGE_WAIT) {
msleep(regs->value);
} else {
ret = adv748x_write(state, regs->page, regs->reg,
regs->value);
if (ret < 0) {
adv_err(state,
"Error regs page: 0x%02x reg: 0x%02x\n",
regs->page, regs->reg);
return ret;
}
for (; regs->page != ADV748X_PAGE_EOR; regs++) {
ret = adv748x_write(state, regs->page, regs->reg, regs->value);
if (ret < 0) {
adv_err(state, "Error regs page: 0x%02x reg: 0x%02x\n",
regs->page, regs->reg);
return ret;
}
regs++;
}
return 0;

Просмотреть файл

@ -39,7 +39,6 @@ enum adv748x_page {
ADV748X_PAGE_MAX,
/* Fake pages for register sequences */
ADV748X_PAGE_WAIT, /* Wait x msec */
ADV748X_PAGE_EOR, /* End Mark */
};