OMAP: DSS2: fix timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

checking some patches thru www.kernel.org

/drivers/video/omap2/dss/dss.c

I noticed that if timeout happens,
REG_GET is not checked after last 1000th udelay.
Why not check it?

static int _omap_dss_wait_reset(void)
{
-	unsigned timeout = 1000;
+	int timeout = 1000;

	while (REG_GET(DSS_SYSSTATUS, 0, 0) == 0) {
-		udelay(1);
-		if (!--timeout) {
+		if (--timeout < 0) {
			DSSERR("soft reset failed\n");
			return -ENODEV;
		}
+		udelay(1);
	}

	return 0;
}


Reported-by: "Juha Leppanen" <juha_motorsportcom@xxxxxxxxxx>
Signed-off-by: "Juha Leppanen" <juha_motorsportcom@xxxxxxxxxx>

No reply needed to me,
my spam filter will probably eat your reply.

Happy hacking,

Mr. Juha Leppanen
Kuopio, Finland


....................................................................
Luukku Plus -paketilla pääset eroon tila- ja turvallisuusongelmista.
Hanki Luukku Plus ja helpotat elämääsi. http://www.mtv3.fi/luukku
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux