From patchwork Thu Aug 23 10:33:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1365631 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 999363FC66 for ; Thu, 23 Aug 2012 10:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030225Ab2HWKia (ORCPT ); Thu, 23 Aug 2012 06:38:30 -0400 Received: from na3sys009aog101.obsmtp.com ([74.125.149.67]:43854 "EHLO na3sys009aog101.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933894Ab2HWKiF (ORCPT ); Thu, 23 Aug 2012 06:38:05 -0400 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]) (using TLSv1) by na3sys009aob101.postini.com ([74.125.148.12]) with SMTP ID DSNKUDYIDNAfnRt52fCSXcgem3iUUBoT0hAI@postini.com; Thu, 23 Aug 2012 03:38:05 PDT Received: by lahm15 with SMTP id m15so321818lah.3 for ; Thu, 23 Aug 2012 03:38:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=QwdRQs8T9x62KCkyo3nykRPdurnvA4cld+hid1K1q5E=; b=MiPn7es1Zq/1iuAl5lH8WWwZjXaoonIpehiwxKf39P/bTDrLTs9ymzYmoBsE7YJuRq AzEhV+AuauHNV3amp+/7i7A90BBtYJjhxXHje7YfNLbS+tvie74lZcDzV3A/9OJxKnmN 1gLldGA9RucdXewCXm8dA1jR82nXezN/UmFadAJ2ucpoCAjT6ZGcDiC6uYTlsLzd4Hpt HNNKAllYXW1nyKYBQTGQd3Uo6EJZzeBaIvgnUZ7BKUOWTNfbybrxC4USFWJ7S3HaUOG+ IqyrZfKrPlXd9V1S8jLoTCk5OyYAd2u4GTjQDUip0Z6ktzSJYntv+dOFrep8L/l/BMkw o4vA== Received: by 10.152.132.133 with SMTP id ou5mr1168962lab.45.1345718283329; Thu, 23 Aug 2012 03:38:03 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id nf5sm7101704lab.3.2012.08.23.03.38.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 03:38:02 -0700 (PDT) From: Felipe Balbi To: alan@linux.intel.com Cc: Tony Lindgren , Kevin Hilman , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , linux-serial@vger.kernel.org, Linux Kernel Mailing List , Santosh Shilimkar , Shubhrajyoti Datta , Sourav Poddar , Felipe Balbi Subject: [PATCH v3 22/23] serial: omap: move uart_omap_port definition to C file Date: Thu, 23 Aug 2012 13:33:02 +0300 Message-Id: <1345717983-18179-23-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc3 In-Reply-To: <1345717983-18179-1-git-send-email-balbi@ti.com> References: <1345717983-18179-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQlhT9AfsDn4lQ6Wh7wZ7HGeS8ZVuDvj+oA4xdI0Ugg6SDcdlf436O9kpHAdh52rCG5GgZGX Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org nobody needs to access the uart_omap_port structure other than omap-serial.c file. Let's move that structure definition to the C source file in order to prevent anyone from accessing our structure. Tested-by: Shubhrajyoti D Signed-off-by: Felipe Balbi Acked-by: Tony Lindgren --- arch/arm/plat-omap/include/plat/omap-serial.h | 37 -------------------------- drivers/tty/serial/omap-serial.c | 38 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index 12e6805..c266934 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h @@ -102,41 +102,4 @@ struct uart_omap_dma { unsigned int rx_timeout; }; -struct uart_omap_port { - struct uart_port port; - struct uart_omap_dma uart_dma; - struct device *dev; - - unsigned char ier; - unsigned char lcr; - unsigned char mcr; - unsigned char fcr; - unsigned char efr; - unsigned char dll; - unsigned char dlh; - unsigned char mdr1; - unsigned char scr; - - int use_dma; - /* - * Some bits in registers are cleared on a read, so they must - * be saved whenever the register is read but the bits will not - * be immediately processed. - */ - unsigned int lsr_break_flag; - unsigned char msr_saved_flags; - char name[20]; - unsigned long port_activity; - u32 context_loss_cnt; - u32 errata; - u8 wakeups_enabled; - - struct pm_qos_request pm_qos_request; - u32 latency; - u32 calc_latency; - struct work_struct qos_work; -}; - -#define to_uart_omap_port(p) ((container_of((p), struct uart_omap_port, port))) - #endif /* __OMAP_SERIAL_H__ */ diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index e5a56cb..0e5ffdf 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -69,6 +69,44 @@ #define OMAP_UART_MVR_MAJ_SHIFT 8 #define OMAP_UART_MVR_MIN_MASK 0x3f +struct uart_omap_port { + struct uart_port port; + struct uart_omap_dma uart_dma; + struct device *dev; + + unsigned char ier; + unsigned char lcr; + unsigned char mcr; + unsigned char fcr; + unsigned char efr; + unsigned char dll; + unsigned char dlh; + unsigned char mdr1; + unsigned char scr; + + int use_dma; + /* + * Some bits in registers are cleared on a read, so they must + * be saved whenever the register is read but the bits will not + * be immediately processed. + */ + unsigned int lsr_break_flag; + unsigned char msr_saved_flags; + char name[20]; + unsigned long port_activity; + u32 context_loss_cnt; + u32 errata; + u8 wakeups_enabled; + unsigned int irq_pending:1; + + struct pm_qos_request pm_qos_request; + u32 latency; + u32 calc_latency; + struct work_struct qos_work; +}; + +#define to_uart_omap_port(p) ((container_of((p), struct uart_omap_port, port))) + static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS]; /* Forward declaration of functions */