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: 1366281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 961013FC66 for ; Thu, 23 Aug 2012 10:51:46 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4UwV-0007Ke-O4; Thu, 23 Aug 2012 10:47:17 +0000 Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1T4Une-00015I-4F for linux-arm-kernel@lists.infradead.org; Thu, 23 Aug 2012 10:38:07 +0000 Received: from mail-lb0-f181.google.com ([209.85.217.181]) (using TLSv1) by na3sys009aob107.postini.com ([74.125.148.12]) with SMTP ID DSNKUDYIDNAfnRt52fCSXcgem3iUUBoT0hAI@postini.com; Thu, 23 Aug 2012 03:38:05 PDT Received: by lbbgk1 with SMTP id gk1so382624lbb.26 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=mi+7/PxJN5OKDYDtEasqNHd+/3RR9m1bkLwLNZWLja3Z3ikR283dFAdisGBvH92SxO Ax3cwqi6cg/hkajan2iIXimj1qS+sHXjnlg+pAcL/qDUDJ4acCamexpvObjwOmzOA7tX Rz0uTLdoVC8kPJdIqWFOIlJwQ9vCnRvuBxt+Y4l5cKzlzmGITYxkCwS4/oKXvoXXrAFq ipWM5FmZpQrm3cR8QVFfQzCbXtneOpPLQJqcCUq+Q/yCtkedhKGM/EsX+fMxZAJQy0Mn xzM//5GGG364b66WYM7G+eG3mEXAf5MWEpYo6yBfd0lhOwIoMmzmlnDuC+a3oQdWFffB TtjA== 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 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: ALoCoQmsqRW9IZ+6Fx3Jb5HYOyFCpMVOfVHQSfTrOa/5RNu1m8hzfHFzzNsD5B9EEFgZ/6yxlWwW X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.197 listed in list.dnswl.org] 0.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kevin Hilman , Tony Lindgren , Linux Kernel Mailing List , Felipe Balbi , Santosh Shilimkar , linux-serial@vger.kernel.org, Sourav Poddar , Linux OMAP Mailing List , Shubhrajyoti Datta , Linux ARM Kernel Mailing List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 */