From patchwork Fri Apr 10 12:19:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pramod Gurav X-Patchwork-Id: 6194861 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5F522BF4A6 for ; Fri, 10 Apr 2015 12:21:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55F2A203EB for ; Fri, 10 Apr 2015 12:21:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 743E8203DB for ; Fri, 10 Apr 2015 12:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754896AbbDJMVn (ORCPT ); Fri, 10 Apr 2015 08:21:43 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35730 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754830AbbDJMVm (ORCPT ); Fri, 10 Apr 2015 08:21:42 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 24F6313FF9F; Fri, 10 Apr 2015 12:21:42 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 1578C13FFE2; Fri, 10 Apr 2015 12:21:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from blr-ubuntu-56.ap.qualcomm.com (unknown [202.46.23.61]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gpramod@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0259D13FF9F; Fri, 10 Apr 2015 12:21:38 +0000 (UTC) From: Pramod Gurav To: linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, bryanh@codeaurora.org, sboyd@codeaurora.org, jslaby@suse.cz, Pramod Gurav Subject: [PATCH v3 2/3] tty: serial: msm: Remove duplicate operations on clocks in startup/shutdown Date: Fri, 10 Apr 2015 17:49:55 +0530 Message-Id: <1428668396-6955-2-git-send-email-gpramod@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1428668396-6955-1-git-send-email-gpramod@codeaurora.org> References: <1428668396-6955-1-git-send-email-gpramod@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP clk_prepare_enable/clk_disable_unprepare is already done in .pm function of uart_ops hence get rid of them from msm_startup and msm_shutdown. Signed-off-by: Pramod Gurav --- Changes since last version: - Decided to drop calls to clk operations drivers/tty/serial/msm_serial.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index 99aba04..c32b088 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -494,8 +494,6 @@ static int msm_startup(struct uart_port *port) if (unlikely(ret)) return ret; - msm_init_clock(port); - if (likely(port->fifosize > 12)) rfr_level = port->fifosize - 12; else @@ -525,8 +523,6 @@ static void msm_shutdown(struct uart_port *port) msm_port->imr = 0; msm_write(port, 0, UART_IMR); /* disable interrupts */ - clk_disable_unprepare(msm_port->clk); - free_irq(port->irq, port); } @@ -683,8 +679,7 @@ static void msm_power(struct uart_port *port, unsigned int state, switch (state) { case 0: - clk_prepare_enable(msm_port->clk); - clk_prepare_enable(msm_port->pclk); + msm_init_clock(port); break; case 3: clk_disable_unprepare(msm_port->clk);