Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4092921pxf; Tue, 23 Mar 2021 02:26:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/ZMV5GRogbR8W9RdprBZc25F7cJIHT1poxjv6a5ktVpz77UFf9Hrad+0fjhSycBAAGFnz X-Received: by 2002:a17:906:4955:: with SMTP id f21mr4167257ejt.74.1616491570468; Tue, 23 Mar 2021 02:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616491570; cv=none; d=google.com; s=arc-20160816; b=a1isWvNmZdqEjkBbKHo2Er9Fint1e1C/Aamsfn4vKd89B4a63xmqL4a0TkzadXwnjM +veHmfyFdWudQJjBt5EtcFLyLTDPHFBsahAwMZdK78i/6LzKJ3CkA2qxywVXnE00No8t isPDDcq9HL2kcBFGNlA8BM9UZkRRbaScrLNNAkJXikFrsL9aTPw+I1KsPRv+Rb12Z+5a qu2UvohPJs8D6skz2qDH5W4fmgfOEBr0ugsXMBDGu6X2bQYXsUh9OV4RJ3+bNftStwvo ZVfoIrwHUSviHtWHn5rULh7tln9wyiTQyVqj2yLPhwSdjykzgeM9looapTIxZyyoADaY LVfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qdcUC/TceTPwQ6d7ufIuCAwKxdQyVDl8z9oCLYsg/uA=; b=BUSfku9cU1DTBRF9AEFgpCaHPJSyMfGUoMtDxndt+DtU86KhMQHBdNDU+T8riG0x6u vjH59xOCXZjwfO/2a3eStzQwIEyGNC05IqEbyVPWI7TCriDbWzhAinD0DLyBIFpzFHAj sqT/Rn/2xcIr3yqyr9LDudePFRJL332yoXx66f5HB1+ZhUNnlHX+YD3+x5ZUpeS9cGcN Et6tnspegcWOYT64mhQ5Ye83MhgMjoZXSF4CEt4Pwd0behVdD7Xk237Y8sF28Jul1AYu zxxVEbdyTP6ZR2skSl+u4d/znosyow75cdsCI3gsPfs6nL9NN9rBZb3cOPi6LWFxQ/A5 iKjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="pk3u/yo5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z12si12965208ejj.612.2021.03.23.02.25.47; Tue, 23 Mar 2021 02:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="pk3u/yo5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbhCWJYQ (ORCPT + 99 others); Tue, 23 Mar 2021 05:24:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:47016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbhCWJYL (ORCPT ); Tue, 23 Mar 2021 05:24:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9176C61984; Tue, 23 Mar 2021 09:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616491451; bh=DPywEhpZNo0wJHcWiKZrIfCpAVQnGNuCBlmXyMkMAbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pk3u/yo5T+Jhe0wSJKsz1HCe7s9TyipXtva0RG46qwXFV/z4lDtnf6M3yZh1xDZOH 7vm8LdsQkh9iu4aEbHrstJHXJQT2M0shByGXGoU8YM+tREo9HbOHc8nE0L9HnuMvn9 tFBt7pSgczjTDdYErf/DiDOXgkSMtoCWOycM5rY4= Date: Tue, 23 Mar 2021 10:24:08 +0100 From: Greg Kroah-Hartman To: Alex Nemirovsky Cc: Jiri Slaby , Jason Li , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH 1/3] tty: serial: Add UART driver for Cortina-Access platform Message-ID: References: <1613702532-5096-1-git-send-email-alex.nemirovsky@cortina-access.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1613702532-5096-1-git-send-email-alex.nemirovsky@cortina-access.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 18, 2021 at 06:42:09PM -0800, Alex Nemirovsky wrote: > +static struct cortina_uart_port *cortina_uart_ports; Why is this not a per-device pointer? > +static void __exit cortina_uart_exit(void) > +{ > + platform_driver_unregister(&serial_cortina_driver); > + uart_unregister_driver(&cortina_uart_driver); > + kfree(cortina_uart_ports); Should not need to free this here, it should be tied to the device, not the driver. > +} > + > +module_init(cortina_uart_init); > +module_exit(cortina_uart_exit); > + > +MODULE_AUTHOR("Cortina-Access Inc."); > +MODULE_DESCRIPTION(" Cortina-Access UART driver"); > +MODULE_LICENSE("GPL"); > diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h > index 62c2204..1931892 100644 > --- a/include/uapi/linux/serial_core.h > +++ b/include/uapi/linux/serial_core.h > @@ -277,4 +277,7 @@ > /* Freescale LINFlexD UART */ > #define PORT_LINFLEXUART 122 > > +/* Cortina-Access UART */ > +#define PORT_CORTINA_ACCESS 123 Also, no need for this, right? I would prefer to not add new ids if at all possible. thanks, greg k-h