Skip to content

Commit

Permalink
media: atomisp: Remove unnecessary msleep(10) from atomisp_mrfld_powe…
Browse files Browse the repository at this point in the history
…r() error path

Remove unnecessary msleep(10) from atomisp_mrfld_power() error-exit path,
the success exit from atomisp_mrfld_power() happens if a test succeeds
inside the do { } while loop above the msleep().

The error-exit path with the removed msleep is only hit it the power-on is
not reflected in the iUNIT ISPSSPM0 status bits after a timeout of 50 ms.
Sleeping an extra 10 ms in the timeout path makes little sense.

Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
jwrdegoede authored and mchehab committed Feb 1, 2024
1 parent a6be73e commit ace440e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/staging/media/atomisp/pci/atomisp_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,6 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
usleep_range(100, 150);
} while (1);

if (enable)
msleep(10);

dev_err(isp->dev, "IUNIT power-%s timeout.\n", enable ? "on" : "off");
return -EBUSY;
}
Expand Down

0 comments on commit ace440e

Please sign in to comment.