From: govindraj.raja@ti.com (Govindraj.R)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 18/21] OMAP2+: UART: remove temporary variable used to count uart instance
Date: Tue, 18 Oct 2011 21:05:09 +0530 [thread overview]
Message-ID: <1318952110-10659-4-git-send-email-govindraj.raja@ti.com> (raw)
In-Reply-To: <1318952110-10659-1-git-send-email-govindraj.raja@ti.com>
Reuse the num_uarts variable itself to count number of uarts.
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
arch/arm/mach-omap2/serial.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 55ce950..e1eba7f 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -253,15 +253,13 @@ static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {}
static int __init omap_serial_early_init(void)
{
- int i = 0;
-
do {
char oh_name[MAX_UART_HWMOD_NAME_LEN];
struct omap_hwmod *oh;
struct omap_uart_state *uart;
snprintf(oh_name, MAX_UART_HWMOD_NAME_LEN,
- "uart%d", i + 1);
+ "uart%d", num_uarts + 1);
oh = omap_hwmod_lookup(oh_name);
if (!oh)
break;
@@ -271,9 +269,8 @@ static int __init omap_serial_early_init(void)
return -ENODEV;
uart->oh = oh;
- uart->num = i++;
+ uart->num = num_uarts++;
list_add_tail(&uart->node, &uart_list);
- num_uarts++;
/*
* NOTE: omap_hwmod_setup*() has not yet been called,
--
1.7.4.1
next prev parent reply other threads:[~2011-10-18 15:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 15:35 [PATCH v7 15/21] OMAP2+: UART: Make the RX_TIMEOUT for DMA configurable for each UART Govindraj.R
2011-10-18 15:35 ` [PATCH v7 16/21] OMAP2+: UART: Remove custom activate funcs and use generic funcs Govindraj.R
2011-11-04 22:00 ` Kevin Hilman
2011-11-07 8:39 ` Govindraj
2011-10-18 15:35 ` [PATCH v7 17/21] OMAP2+: UART: Remove omap_uart_can_sleep and add pm_qos Govindraj.R
2011-11-04 22:42 ` Kevin Hilman
2011-11-08 9:16 ` Rajendra Nayak
2011-11-08 19:20 ` Kevin Hilman
2011-11-10 12:00 ` Govindraj
2011-11-10 19:02 ` Kevin Hilman
2011-11-11 10:17 ` Govindraj
2011-10-18 15:35 ` Govindraj.R [this message]
2011-10-18 15:35 ` [PATCH v7 19/21] OMAP2+: UART: Use custom activate func for console uart Govindraj.R
2011-11-04 23:00 ` Kevin Hilman
2011-11-07 8:42 ` Govindraj
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=1318952110-10659-4-git-send-email-govindraj.raja@ti.com \
--to=govindraj.raja@ti.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).