From patchwork Thu Aug 23 10:32:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1366151 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 781043FC66 for ; Thu, 23 Aug 2012 10:48:17 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4UtC-0004WX-ME; Thu, 23 Aug 2012 10:43:52 +0000 Received: from na3sys009aog121.obsmtp.com ([74.125.149.145]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1T4UnM-0000xQ-8Q for linux-arm-kernel@lists.infradead.org; Thu, 23 Aug 2012 10:37:49 +0000 Received: from mail-lpp01m010-f54.google.com ([209.85.215.54]) (using TLSv1) by na3sys009aob121.postini.com ([74.125.148.12]) with SMTP ID DSNKUDYH+pDOZeXpVeIRPXnz4GwAQaDLsaX6@postini.com; Thu, 23 Aug 2012 03:37:48 PDT Received: by lage12 with SMTP id e12so392865lag.13 for ; Thu, 23 Aug 2012 03:37:44 -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=cKGuBs2o56mlWgf50bx4v5OIaiG7c2GetX+K4b0Ukmg=; b=SrJnDwWTtisEEKXKyiVrKRhPOjwKQcw/1xmaIr0RnmTbnvEFCC+7lFnJIqk89kedr7 cNoH04UmMyXsYpS92PmC3bQHYYRE6SNryrfEKyTa6OCmbMe59LIs5GlQFB54FvAH5R0G veVETOVNvdrPR7u+P/m3lewLqTt2hUrFPKHqMPkV3L2mc2N4UTIErd481/obfSdyewR+ yqU761wm8FDWW3Bpo6YpU9LcFuGeLku6eVnWXQvp7pDNV17u9Ht3ymn3uAEnxXwXo+Uw nqKa7MQVILekHte85CvsE6mOevMadE/CgMrbjELdIx2V492E9+41dOsQI95blTc80n9a N8Ow== Received: by 10.112.100.65 with SMTP id ew1mr689939lbb.16.1345718264720; Thu, 23 Aug 2012 03:37:44 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id hz16sm7092761lab.6.2012.08.23.03.37.43 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 03:37:43 -0700 (PDT) From: Felipe Balbi To: alan@linux.intel.com Subject: [PATCH v3 15/23] serial: omap: optimization with section annotations Date: Thu, 23 Aug 2012 13:32:55 +0300 Message-Id: <1345717983-18179-16-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: ALoCoQnw7DFOogAbuf/udhP7w5c6+sP1GLZfyEmf8aVbPCEcUoEdCjVoP3gZk2WlapEvbkgcYuPo 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.145 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 , Ruchika Kharwar 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 Two functions: omap_serial_fill_features_erratas() and of_get_uart_port_info() are only called from probe(). Marking them as __devinit gives us another oportunity to free some code after .init.text is done. Tested-by: Shubhrajyoti D Signed-off-by: Ruchika Kharwar Signed-off-by: Felipe Balbi --- drivers/tty/serial/omap-serial.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 8254561..bdfd019 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1154,7 +1154,7 @@ static int serial_omap_resume(struct device *dev) } #endif -static void omap_serial_fill_features_erratas(struct uart_omap_port *up) +static void __devinit omap_serial_fill_features_erratas(struct uart_omap_port *up) { u32 mvr, scheme; u16 revision, major, minor; @@ -1207,7 +1207,7 @@ static void omap_serial_fill_features_erratas(struct uart_omap_port *up) } } -static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev) +static __devinit struct omap_uart_port_info *of_get_uart_port_info(struct device *dev) { struct omap_uart_port_info *omap_up_info; @@ -1220,7 +1220,7 @@ static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev) return omap_up_info; } -static int serial_omap_probe(struct platform_device *pdev) +static int __devinit serial_omap_probe(struct platform_device *pdev) { struct uart_omap_port *up; struct resource *mem, *irq; @@ -1331,7 +1331,7 @@ err_port_line: return ret; } -static int serial_omap_remove(struct platform_device *dev) +static int __devexit serial_omap_remove(struct platform_device *dev) { struct uart_omap_port *up = platform_get_drvdata(dev); @@ -1475,7 +1475,7 @@ MODULE_DEVICE_TABLE(of, omap_serial_of_match); static struct platform_driver serial_omap_driver = { .probe = serial_omap_probe, - .remove = serial_omap_remove, + .remove = __devexit_p(serial_omap_remove), .driver = { .name = DRIVER_NAME, .pm = &serial_omap_dev_pm_ops,