[PATCH] max3100 driver

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christian Pellegrin
Date: Friday, October 10, 2008 - 5:08 am

Hi,

This patch fixes a problem about PM in my code that I found when testing
patches that went in -mm. The full patch against the Linus tree can be
found at http://www.evolware.org/chri/paciugo/

---
diff --git a/drivers/serial/max3100.c b/drivers/serial/max3100.c
index 7a269a6..462d6a4 100644
--- a/drivers/serial/max3100.c
+++ b/drivers/serial/max3100.c
@@ -566,6 +566,7 @@ static void max3100_shutdown(struct uart_port *port)
 	if (s->workqueue) {
 		flush_workqueue(s->workqueue);
 		destroy_workqueue(s->workqueue);
+		s->workqueue = NULL;
 	}
 	if (s->irq)
 		free_irq(s->irq, s);
@@ -614,6 +615,7 @@ static int max3100_startup(struct uart_port *port)
 		dev_warn(&s->spi->dev, "cannot allocate irq %d\n", s->irq);
 		s->irq = 0;
 		destroy_workqueue(s->workqueue);
+		s->workqueue = NULL;
 		return -EBUSY;
 	}
 
@@ -884,7 +886,8 @@ static int max3100_resume(struct spi_device *spi)
 	enable_irq(s->irq);
 
 	s->conf_commit = 1;
-	max3100_dowork(s);
+	if (s->workqueue)
+		max3100_dowork(s);
 
 	return 0;
 }
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] max3100 driver, Christian Pellegrin, (Sat Sep 20, 12:20 am)
Re: [PATCH] max3100 driver, Andrew Morton, (Sat Sep 20, 1:24 am)
Re: [PATCH] max3100 driver, chri, (Sat Sep 20, 3:35 am)
Re: [PATCH] max3100 driver, Arjan van de Ven, (Sat Sep 20, 6:56 am)
Re: [PATCH] max3100 driver, Alan Cox, (Sat Sep 20, 7:11 am)
Re: [PATCH] max3100 driver, chri, (Sat Sep 20, 7:30 am)
Re: [PATCH] max3100 driver, Alan Cox, (Sat Sep 20, 7:34 am)
Re: [PATCH] max3100 driver, chri, (Sat Sep 20, 7:37 am)
Re: [PATCH] max3100 driver, chri, (Wed Oct 8, 11:23 pm)
Re: [PATCH] max3100 driver, chri, (Wed Oct 8, 11:30 pm)
Re: [PATCH] max3100 driver, Alan Cox, (Thu Oct 9, 2:18 am)
[PATCH] max3100 driver, Christian Pellegrin, (Fri Oct 10, 5:08 am)