From patchwork Tue Oct 20 23:53:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav.Michl@seznam.cz X-Patchwork-Id: 55016 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9KLrpqn013713 for ; Tue, 20 Oct 2009 21:53:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251AbZJTVxX (ORCPT ); Tue, 20 Oct 2009 17:53:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752083AbZJTVxW (ORCPT ); Tue, 20 Oct 2009 17:53:22 -0400 Received: from smtp.seznam.cz ([77.75.72.43]:45163 "EHLO smtp.seznam.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752037AbZJTVxU (ORCPT ); Tue, 20 Oct 2009 17:53:20 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=seznam.cz; h=Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-Smtpd:X-Seznam-User:X-QM-Mark; b=Esjq5GY2rK0oXgvtKVw0651RO+EWdcOrRntHaleKT5D8NW79sQCWnoJMhXBuJ+jVL oA9RXJApcYYLo83RZ7p8hYHMKUwGOTX58JMGv256iVQxMbepm4bjdi35ZLHNE7Htezf QJpdw/o52r2yxm4pAt5CBsCYcDtl2qlycHJ+bsk= Received: from debian (34.24.broadband3.iol.cz [85.70.24.34]) by email-relay1.go.seznam.cz (Seznam SMTPD 1.1.7@13984) with ESMTP; Tue, 20 Oct 2009 23:53:21 +0200 (CEST) Received: by debian (sSMTP sendmail emulation); Wed, 21 Oct 2009 01:53:26 +0200 Date: Wed, 21 Oct 2009 01:53:26 +0200 From: Ladislav.Michl@seznam.cz To: Tony Lindgren Cc: linux-omap@vger.kernel.org, Alexander Shishkin , Kevin Hilman Subject: Re: [APPLIED] [PATCH] [RFC] OMAP: eliminate OMAP_MAX_NR_PORTS Message-ID: <20091020233115.GA7363@localhost.localdomain> Reply-To: Ladislav Michl References: <1254995997-26420-1-git-send-email-virtuoso@slind.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Smtpd: 1.1.7@13984 X-Seznam-User: ladislav.michl@seznam.cz X-QM-Mark: email-qm4<399954583> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 9c59332..0392ff5 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c @@ -86,7 +86,9 @@ static struct plat_serial8250_port serial_platform_data[] = { .iotype = UPIO_MEM, .regshift = 2, .uartclk = OMAP16XX_BASE_BAUD * 16, - }, + }, { + } + }; static struct platform_device serial_device = { @@ -119,7 +121,7 @@ void __init omap_serial_init(void) serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16; } - for (i = 0; i < ARRAY_SIZE(serial_platform_data); i++) { + for (i = 0; i < ARRAY_SIZE(serial_platform_data) - 1; i++) { unsigned char reg; /* Static mapping, never released */ diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index dabc089..ca69ffa 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -585,7 +585,7 @@ void __init omap_serial_early_init(void) * if not needed. */ - for (i = 0; i < ARRAY_SIZE(omap_uart); i++) { + for (i = 0; i < ARRAY_SIZE(omap_uart) - 1; i++) { struct omap_uart_state *uart = &omap_uart[i]; struct platform_device *pdev = &uart->pdev; struct device *dev = &pdev->dev; @@ -637,7 +637,7 @@ void __init omap_serial_init(void) { int i; - for (i = 0; i < ARRAY_SIZE(omap_uart); i++) { + for (i = 0; i < ARRAY_SIZE(omap_uart) - 1; i++) { struct omap_uart_state *uart = &omap_uart[i]; struct platform_device *pdev = &uart->pdev; struct device *dev = &pdev->dev;