From patchwork Thu Aug 23 10:32:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1366091 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 B793A3FC66 for ; Thu, 23 Aug 2012 10:46: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 1T4Urw-0003Xn-HH; Thu, 23 Aug 2012 10:42:33 +0000 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1T4UnE-0000uV-5A for linux-arm-kernel@lists.infradead.org; Thu, 23 Aug 2012 10:37:41 +0000 Received: from mail-lpp01m010-f45.google.com ([209.85.215.45]) (using TLSv1) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKUDYH8l7vLRuEuGt3prpQveEeksWE+uFE@postini.com; Thu, 23 Aug 2012 03:37:39 PDT Received: by lagz14 with SMTP id z14so312846lag.4 for ; Thu, 23 Aug 2012 03:37:36 -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=n9aFIUyjpBDezIqBw29nUHpj8SIIv3QizhfQfCGzdJI=; b=Y9VEkiqQcMiU5tJ3M1ll4EhovSft4oJRy2C5VbTRS98yqODTk4dqim+jhARO8VnPDz mgXDPJne7DFXSGMupuokTp8kCMajicTr4yt4eilST6fJA7jfBHBCeK5RsML6xP7LMpMe 6Sbi5a0kMv7jRSF7Bwav7oaH0Xrk4Ksej7Zzy/x+CsFFj4iqZGl79KgkANWNtuOgcwn+ U/iDswYWgwQXTSzjq+vJvFu6bH4nSqQYVqUg9iU2DD2BbUtMgnml5dHUgJxYY74Q9SqJ VPZuoucFi+fRE9jIYz/Rg2FB6SBBEwqOaX5X0i5/dJgg8Esp9oTSfhplEmbj+OQCdKbV xtdA== Received: by 10.112.88.106 with SMTP id bf10mr680645lbb.43.1345718256474; Thu, 23 Aug 2012 03:37:36 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id o3sm1782732lbk.6.2012.08.23.03.37.35 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 03:37:35 -0700 (PDT) From: Felipe Balbi To: alan@linux.intel.com Subject: [PATCH v3 12/23] serial: omap: make sure to suspend device before remove Date: Thu, 23 Aug 2012 13:32:52 +0300 Message-Id: <1345717983-18179-13-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: ALoCoQnqVVN6PuDHuz6oOZGELrIf71QLWhA+xiDmdI5DSNXsZsaRKzHJo2PuvxZFCwf/wRVbvqhX 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.75 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 before removing the driver, let's make sure to force device into a suspended state in order to conserve power. Tested-by: Shubhrajyoti D Acked-by: Santosh Shilimkar Signed-off-by: Felipe Balbi --- drivers/tty/serial/omap-serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 9581741..2df725b 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1336,6 +1336,7 @@ static int serial_omap_remove(struct platform_device *dev) { struct uart_omap_port *up = platform_get_drvdata(dev); + pm_runtime_put_sync(up->dev); pm_runtime_disable(up->dev); uart_remove_one_port(&serial_omap_reg, &up->port); pm_qos_remove_request(&up->pm_qos_request);