Re: [PATCH 1/2] serial: etraxfs-uart: Fix release etraxfs_uart_ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/02/2015 08:02 AM, Axel Lin wrote:
> In probe, we use dev_id as array index of etraxfs_uart_ports and store the
> index in port->line. So etraxfs_uart_ports[port->line] should be released
> when unload the module.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
> ---
>  drivers/tty/serial/etraxfs-uart.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/etraxfs-uart.c b/drivers/tty/serial/etraxfs-uart.c
> index a57301a..679709f 100644
> --- a/drivers/tty/serial/etraxfs-uart.c
> +++ b/drivers/tty/serial/etraxfs-uart.c
> @@ -950,7 +950,7 @@ static int etraxfs_uart_remove(struct platform_device *pdev)
>  
>  	port = platform_get_drvdata(pdev);
>  	uart_remove_one_port(&etraxfs_uart_driver, port);
> -	etraxfs_uart_ports[pdev->id] = NULL;
> +	etraxfs_uart_ports[port->line] = NULL;
>  
>  	return 0;
>  }
Acked-by: Niklas Cassel <nks@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux