From patchwork Tue Jan 5 16:57:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shishkin X-Patchwork-Id: 71056 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o05GwaFR014635 for ; Tue, 5 Jan 2010 16:58:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754614Ab0AEQ6e (ORCPT ); Tue, 5 Jan 2010 11:58:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754570Ab0AEQ6e (ORCPT ); Tue, 5 Jan 2010 11:58:34 -0500 Received: from smtp.nokia.com ([192.100.122.230]:38249 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754505Ab0AEQ6d (ORCPT ); Tue, 5 Jan 2010 11:58:33 -0500 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o05Gw4B6001424; Tue, 5 Jan 2010 18:58:26 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 5 Jan 2010 18:58:22 +0200 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 5 Jan 2010 18:58:20 +0200 Received: from esdhcp04087 (esdhcp040140.research.nokia.com [172.21.40.140]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o05GwFan029613 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 5 Jan 2010 18:58:17 +0200 Received: from ash by esdhcp04087 with local (Exim 4.69) (envelope-from ) id 1NSCjW-0006bo-Fx; Tue, 05 Jan 2010 18:58:14 +0200 From: Alexander Shishkin To: Tony Lindgren Cc: linux-omap@vger.kernel.org, Alexander Shishkin , Mika Westerberg , Kevin Hilman Subject: [PATCH] omap: make serial_in_override() address the right uart port Date: Tue, 5 Jan 2010 18:57:40 +0200 Message-Id: <1262710660-25376-1-git-send-email-virtuoso@slind.org> X-Mailer: git-send-email 1.6.3.3 X-OriginalArrivalTime: 05 Jan 2010 16:58:21.0385 (UTC) FILETIME=[49587390:01CA8E28] X-Nokia-AV: Clean 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-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 19805a7..8c964be 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -125,6 +125,13 @@ static struct plat_serial8250_port serial_platform_data3[] = { } }; #endif +static inline unsigned int __serial_read_reg(struct uart_port *up, + int offset) +{ + offset <<= up->regshift; + return (unsigned int)__raw_readb(up->membase + offset); +} + static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, int offset) { @@ -583,11 +590,12 @@ static unsigned int serial_in_override(struct uart_port *up, int offset) { if (UART_RX == offset) { unsigned int lsr; - lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR); + lsr = __serial_read_reg(up, UART_LSR); if (!(lsr & UART_LSR_DR)) return -EPERM; } - return serial_read_reg(omap_uart[up->line].p, offset); + + return __serial_read_reg(up, offset); } void __init omap_serial_early_init(void)