All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: virtuoso@slind.org
Cc: Tony Lindgren <tony@atomide.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCH] [RFC] OMAP: eliminate OMAP_MAX_NR_PORTS
Date: Fri, 09 Oct 2009 09:38:33 -0700	[thread overview]
Message-ID: <87ljjkwmie.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1254995997-26420-1-git-send-email-virtuoso@slind.org> (virtuoso@slind.org's message of "Thu\,  8 Oct 2009 12\:59\:57 +0300")

virtuoso@slind.org writes:

> From: Alexander Shishkin <virtuoso@slind.org>
>
> Signed-off-by: Alexander Shishkin <virtuoso@slind.org>

Looks like a good cleanup to me.

Acked-by: Kevin Hilman <khilman@deeprootsystems.com>

> ---
>  arch/arm/mach-omap1/serial.c             |    2 +-
>  arch/arm/mach-omap2/serial.c             |    6 +++---
>  arch/arm/plat-omap/include/mach/serial.h |    4 ----
>  3 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
> index ed07af1..a86de7c 100644
> --- a/arch/arm/mach-omap1/serial.c
> +++ b/arch/arm/mach-omap1/serial.c
> @@ -123,7 +123,7 @@ void __init omap_serial_init(void)
>  		serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
>  	}
>  
> -	for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
> +	for (i = 0; i < ARRAY_SIZE(serial_platform_data); i++) {
>  		unsigned char reg;
>  
>  		switch (i) {
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index ae21868..c5bef44 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -549,7 +549,7 @@ static inline void omap_uart_idle_init(struct omap_uart_state *uart) {}
>  #define DEV_CREATE_FILE(dev, attr)
>  #endif /* CONFIG_PM */
>  
> -static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = {
> +static struct omap_uart_state omap_uart[] = {
>  	{
>  		.pdev = {
>  			.name			= "serial8250",
> @@ -599,7 +599,7 @@ void __init omap_serial_early_init(void)
>  	 * if not needed.
>  	 */
>  
> -	for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
> +	for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
>  		struct omap_uart_state *uart = &omap_uart[i];
>  		struct platform_device *pdev = &uart->pdev;
>  		struct device *dev = &pdev->dev;
> @@ -641,7 +641,7 @@ void __init omap_serial_init(void)
>  {
>  	int i;
>  
> -	for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
> +	for (i = 0; i < ARRAY_SIZE(omap_uart); i++) {
>  		struct omap_uart_state *uart = &omap_uart[i];
>  		struct platform_device *pdev = &uart->pdev;
>  		struct device *dev = &pdev->dev;
> diff --git a/arch/arm/plat-omap/include/mach/serial.h b/arch/arm/plat-omap/include/mach/serial.h
> index e249186..9951345 100644
> --- a/arch/arm/plat-omap/include/mach/serial.h
> +++ b/arch/arm/plat-omap/include/mach/serial.h
> @@ -20,26 +20,22 @@
>  #define OMAP_UART1_BASE		0xfffb0000
>  #define OMAP_UART2_BASE		0xfffb0800
>  #define OMAP_UART3_BASE		0xfffb9800
> -#define OMAP_MAX_NR_PORTS	3
>  #elif defined(CONFIG_ARCH_OMAP2)
>  /* OMAP2 serial ports */
>  #define OMAP_UART1_BASE		0x4806a000
>  #define OMAP_UART2_BASE		0x4806c000
>  #define OMAP_UART3_BASE		0x4806e000
> -#define OMAP_MAX_NR_PORTS	3
>  #elif defined(CONFIG_ARCH_OMAP3)
>  /* OMAP3 serial ports */
>  #define OMAP_UART1_BASE		0x4806a000
>  #define OMAP_UART2_BASE		0x4806c000
>  #define OMAP_UART3_BASE		0x49020000
> -#define OMAP_MAX_NR_PORTS	3
>  #elif defined(CONFIG_ARCH_OMAP4)
>  /* OMAP4 serial ports */
>  #define OMAP_UART1_BASE		0x4806a000
>  #define OMAP_UART2_BASE		0x4806c000
>  #define OMAP_UART3_BASE		0x48020000
>  #define OMAP_UART4_BASE		0x4806e000
> -#define OMAP_MAX_NR_PORTS	4
>  #endif
>  
>  #define OMAP1510_BASE_BAUD	(12000000/16)
> -- 
> 1.6.3.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-10-09 16:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08  9:59 [PATCH] [RFC] OMAP: eliminate OMAP_MAX_NR_PORTS virtuoso
2009-10-09 16:38 ` Kevin Hilman [this message]
2009-10-09 22:46 ` [APPLIED] " Tony Lindgren
2009-10-20 23:53   ` Ladislav.Michl
2009-10-20 22:15     ` Tony Lindgren
2009-10-20 23:01       ` Tony Lindgren
2009-10-21  0:40         ` Tony Lindgren
2009-10-21  9:48           ` Ladislav.Michl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ljjkwmie.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=virtuoso@slind.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.