From patchwork Thu Sep 6 12:45:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1414431 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E4DC4DFFCF for ; Thu, 6 Sep 2012 12:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754696Ab2IFMxr (ORCPT ); Thu, 6 Sep 2012 08:53:47 -0400 Received: from na3sys009aog117.obsmtp.com ([74.125.149.242]:58891 "EHLO na3sys009aog117.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755506Ab2IFMup (ORCPT ); Thu, 6 Sep 2012 08:50:45 -0400 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]) (using TLSv1) by na3sys009aob117.postini.com ([74.125.148.12]) with SMTP ID DSNKUEicJHPMt7gVJiN76jdFKlgZXA2SM0tP@postini.com; Thu, 06 Sep 2012 05:50:45 PDT Received: by lagy9 with SMTP id y9so1063363lag.19 for ; Thu, 06 Sep 2012 05:50:43 -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=CrJ6JRTlO3LmAh4WcCBVVCtSelA7MTp/IG2UA5tNiPs=; b=WIk+9lEWhpBb22HSNZUewDLwkkya7/NODr12vphTOdxLa3D2jzBuzlC8SOnduq1aCy NgRlNxst3QEGYVW9uKZdPjP3xsGE96A27ko1tXmkJdcusolCqPEvmIjBpxPz8YlwfZLp Dpr4becKWK6/vfQ5AArkmFyBJ1taDVAdngjNSLbkp7EZUYjnNb/YL5anp/Q22xXD1NK8 8HQwGAuX7+TzZgBRByg80rtb9US1NDofg5unQdyDAxGLSdbNN2OZ7yQv/aZ+qBR/fY9Z xySDVgNrNRP25dywkCPHNs1KoS3o5zOqNwAl5svnmdMRUG4xL1ssLRfezCCKnugbOo+9 AjAA== Received: by 10.152.144.134 with SMTP id sm6mr1887800lab.5.1346935843131; Thu, 06 Sep 2012 05:50:43 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id p7sm377021lbg.17.2012.09.06.05.50.41 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 05:50:42 -0700 (PDT) From: Felipe Balbi To: Greg KH Cc: alan@linux.intel.com, 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 , Ruchika Kharwar , Nishanth Menon , Felipe Balbi Subject: [PATCH v4 12/21] serial: omap: fix sequence of pm_runtime_* calls. Date: Thu, 6 Sep 2012 15:45:31 +0300 Message-Id: <1346935540-1792-13-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc3 In-Reply-To: <1346935540-1792-1-git-send-email-balbi@ti.com> References: <20120906122948.GC29202@arwen.pp.htv.fi> <1346935540-1792-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQnKqEl4XrWTLovgMTYJMg34nU74dA4b8r2z8DjFUBpNuXA3wX9aFma7tHY7j/TQ4ljmv3fy Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Ruchika Kharwar pm_runtime_enable() needs to be invoked before pm_runtime_use_autosuspend(), and pm_runtime_set_autosuspend_delay() functions. Tested-by: Shubhrajyoti D Signed-off-by: Nishanth Menon Signed-off-by: Ruchika Kharwar Signed-off-by: Felipe Balbi --- drivers/tty/serial/omap-serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 99042b0..f5dcb5a 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1333,12 +1333,12 @@ static int serial_omap_probe(struct platform_device *pdev) INIT_WORK(&up->qos_work, serial_omap_uart_qos_work); platform_set_drvdata(pdev, up); + pm_runtime_enable(&pdev->dev); pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, omap_up_info->autosuspend_timeout); pm_runtime_irq_safe(&pdev->dev); - pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); omap_serial_fill_features_erratas(up);