X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmmc%2Fcore%2Fsdio_irq.c;h=722924cdf595b495dbad8f87fd0f5c7749cebc83;hb=e633b7bcec8e26991d489a11615acf7674efbaf4;hp=c292e124107ac13ec36be751024ad3728cafaa40;hpb=e43fe686e48835ca027559a068bbe0b6d264a254;p=linux-2.6-omap-h63xx.git diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index c292e124107..722924cdf59 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -5,6 +5,8 @@ * Created: June 18, 2007 * Copyright: MontaVista Software Inc. * + * Copyright 2008 Pierre Ossman + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at @@ -107,11 +109,14 @@ static int sdio_irq_thread(void *_host) /* * Give other threads a chance to run in the presence of - * errors. FIXME: determine if due to card removal and - * possibly exit this thread if so. + * errors. */ - if (ret < 0) - ssleep(1); + if (ret < 0) { + set_current_state(TASK_INTERRUPTIBLE); + if (!kthread_should_stop()) + schedule_timeout(HZ); + set_current_state(TASK_RUNNING); + } /* * Adaptive polling frequency based on the assumption