[PATCH 10/11] yenta: free_irq() on suspend.

Dominik Brodowski linux at dominikbrodowski.net
Sun Jul 24 16:15:48 EDT 2005


From: Daniel Ritz <daniel.ritz at gmx.ch>

Resume doesn't seem to work without.

Signed-off-by: Daniel Ritz <daniel.ritz at gmx.ch>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---

 drivers/pcmcia/yenta_socket.c |    9 +++++++++
 1 files changed, 9 insertions(+)

Index: 2.6.13-rc3-git2/drivers/pcmcia/yenta_socket.c
===================================================================
--- 2.6.13-rc3-git2.orig/drivers/pcmcia/yenta_socket.c
+++ 2.6.13-rc3-git2/drivers/pcmcia/yenta_socket.c
@@ -1102,6 +1102,8 @@ static int yenta_dev_suspend (struct pci
 		pci_read_config_dword(dev, 17*4, &socket->saved_state[1]);
 		pci_disable_device(dev);
 
+		free_irq(dev->irq, socket);
+
 		/*
 		 * Some laptops (IBM T22) do not like us putting the Cardbus
 		 * bridge into D3.  At a guess, some other laptop will
@@ -1127,6 +1129,13 @@ static int yenta_dev_resume (struct pci_
 		pci_enable_device(dev);
 		pci_set_master(dev);
 
+		if (socket->cb_irq)
+			if (request_irq(socket->cb_irq, yenta_interrupt,
+			                SA_SHIRQ, "yenta", socket)) {
+				printk(KERN_WARNING "Yenta: request_irq() failed on resume!\n");
+				socket->cb_irq = 0;
+			}
+
 		if (socket->type && socket->type->restore_state)
 			socket->type->restore_state(socket);
 	}



More information about the linux-pcmcia mailing list