From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] serial: 8250: Make ISA ports optional Date: Tue, 06 Jan 2015 14:13:59 +0100 Message-ID: <9492211.AECobr3jIN@wuerfel> References: <1420513785-23660-1-git-send-email-peter@hurleysoftware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1420513785-23660-1-git-send-email-peter@hurleysoftware.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Peter Hurley Cc: One Thousand Gnomes , Tony Lindgren , Greg Kroah-Hartman , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Grant Likely , linux-omap@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org List-Id: linux-omap@vger.kernel.org On Monday 05 January 2015 22:09:45 Peter Hurley wrote: > Some arches have no need to create unprobed 8250 ports; these phantom > ports are primarily required for ISA ports which have no probe > mechanism or to provide non-operational ports for userspace to > configure (via TIOCSSERIAL and TIOCSERCONFIG ioctls). > > Provide CONFIG_SERIAL_8250_PHANTOM_UARTS knob to disable phantom port > registration; ie., CONFIG_SERIAL_8250_PHANTOM_UARTS=N only registers > probed ports (ACPI/PNP, "serial8250" platform devices, PCI, etc). > > Cc: Sebastian Andrzej Siewior > Cc: Tony Lindgren > Cc: Grant Likely > Cc: Arnd Bergmann > Signed-off-by: Peter Hurley The intent is definitely right, but I think a better approach is possible. I haven't tried it here, but how about moving the serial8250_init function into a separate module, along with all the other parts that are only used for ISA devices, but leaving the actual core (all exported symbols) in this file? At the same time, the serial8250_pnp_init/serial8250_pnp_exit calls can be removed from the serial8250_init function and become standalone initcalls. Arnd