On 12/18/2007 06:06 PM, Haavard Skinnemoen wrote:
> From: Remy Bohmer <[email protected]>
>
> This patch splits up the interrupt handler of the serial port
> into a interrupt top-half and a tasklet.
[...]
> [[email protected]: misc cleanups and simplifications]
> Signed-off-by: Remy Bohmer <[email protected]>
> Signed-off-by: Haavard Skinnemoen <[email protected]>
> ---
> drivers/serial/atmel_serial.c | 215 ++++++++++++++++++++++++++++++++---------
> 1 files changed, 169 insertions(+), 46 deletions(-)
>
> diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
> index a6b3828..990d3ab 100644
> --- a/drivers/serial/atmel_serial.c
> +++ b/drivers/serial/atmel_serial.c
[...]
> @@ -994,11 +1108,19 @@ static int atmel_serial_resume(struct platform_device *pdev)
> static int __devinit atmel_serial_probe(struct platform_device *pdev)
> {
> struct atmel_uart_port *port;
> + void *data;
> int ret;
>
> + BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE));
> +
> port = &atmel_ports[pdev->id];
> atmel_init_port(port, pdev);
>
> + data = kmalloc(ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
> + if (!data)
{
clk_disable(atmel_port->clk);
clk_put(atmel_port->clk);
> + return -ENOMEM;
}
> + port->rx_ring.buf = data;
> +
> ret = uart_add_one_port(&atmel_uart, &port->uart);
> if (!ret) {
> device_init_wakeup(&pdev->dev, 1);
> @@ -1022,6 +1144,7 @@ static int __devexit atmel_serial_remove(struct platform_device *pdev)
>
> if (port) {
> ret = uart_remove_one_port(&atmel_uart, port);
Don't you need tasklet_kill() here (or somewhere)?
> + kfree(atmel_port->rx_ring.buf);
> kfree(port);
> }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]