Re: [patch 2/6] 12/34: cdrom/cdu31a: replace interruptible_sleep_on()with wait_event_interruptible()

From: Ondrej Zary
Date: Sun Mar 06 2005 - 17:17:46 EST


Domen Puncer wrote:
On 06/03/05 12:42 +0100, Ondrej Zary wrote:

domen@xxxxxxxxxxxx wrote:

Use wait_event_interruptible() instead of the deprecated
interruptible_sleep_on(). The patch is straight-forward as the macros should result in the same execution. Patch is compile-tested (still throws out warnings
regarding {save,restore}_flags()).

Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
Signed-off-by: Domen Puncer <domen@xxxxxxxxxxxx>


Uh, this one escaped me, as schedule() (sleep_on) after cli() is clearly
wrong. Btw. what was the reason for this?

I've never tried the IRQ-driven operation so I don't know if that code still works (it certainly used to for the original author some years ago). I think that it should wait until the IRQ from the drive arrives.

I've posted a patch for the cdu31a driver some time ago that removes almost all usage of interruptible_sleep_on() and also {save,restore}_flags() - it uses semaphore instead.
The only remaining code is in sony_sleep() function when using IRQ-driven operation.

See http://lkml.org/lkml/2004/12/18/107
The patch is big because I've messed with the formatting...


I looked at it, and rewrote some of it into smaller patches. If you don't
mind, can i send them to you for review and testing?

Thanks. I'll test them. I guess that these smaller patches are more likely to be accepted into mainline.

--
Ondrej Zary
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/