From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v2] serial: pl011: honour serial aliases in device tree Date: Tue, 21 Aug 2012 21:42:04 +0100 Message-ID: <20120821204204.GA8316@mudshark.cambridge.arm.com> References: <1345564094-16565-1-git-send-email-matthew.leach@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1345564094-16565-1-git-send-email-matthew.leach-5wv7dgnIgG8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Matthew Leach Cc: "gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org" , "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" , "linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: devicetree@vger.kernel.org Hi Matthew, On Tue, Aug 21, 2012 at 04:48:14PM +0100, Matthew Leach wrote: > diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c > index d3553b5..33c90f6 100644 > --- a/drivers/tty/serial/amba-pl011.c > +++ b/drivers/tty/serial/amba-pl011.c > @@ -52,6 +52,8 @@ > #include > #include > #include > +#include > +#include > #include > #include > > @@ -1869,6 +1871,38 @@ static struct uart_driver amba_reg = { > .cons = AMBA_CONSOLE, > }; > > +static int pl011_probe_dt_alias(int index, struct device *dev) > +{ > + struct device_node *np; > + static bool seen_dev_with_alias = false; > + static bool seen_dev_without_alias = false; > + int ret = index; > + > + if (!IS_ENABLED(CONFIG_OF)) > + return index; May as well return ret here for consistency. With that: Reviewed-by: Will Deacon I guess this goes via Greg's tree rather than the ARM one? Will