Subject: [PATCH] powerpc/serial: Dispose irq mapping when done in mpc52xx_serial.c

From: Sylvain Munaut <[email-masked]>
Date: Thu, 15 Feb 2007 23:18:08 +0100

Signed-off-by: Sylvain Munaut <[email-masked]>
Acked-by: Grant Likely <[email-masked]>
---
Hi Paulus,

This is a 'fixed' version of the uart patch. The test on port->irq != NO_IRQ is
removed. But I added a check for port because it might be NULL ...

	Sylvain
---
 drivers/serial/mpc52xx_uart.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 955bbd6..8d24cd5 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -995,8 +995,10 @@ mpc52xx_uart_of_remove(struct of_device 
 	struct uart_port *port = dev_get_drvdata(&op->dev);
 	dev_set_drvdata(&op->dev, NULL);
 
-	if (port)
+	if (port) {
 		uart_remove_one_port(&mpc52xx_uart_driver, port);
+		irq_dispose_mapping(port->irq);
+	}
 
 	return 0;
 }

-- 
1.4.2