From patchwork Tue Feb 21 12:03:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 9584355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27AF5600C1 for ; Tue, 21 Feb 2017 12:06:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED0302074F for ; Tue, 21 Feb 2017 12:06:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E07E6287D2; Tue, 21 Feb 2017 12:06:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A7112074F for ; Tue, 21 Feb 2017 12:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=f7i1hJ1GKAhyH1K8SByAmnPZHDb0zkB3cg5NO4mi9pU=; b=la3Y9qEJmeqxLHjFrNQPbzVJiW 8RrEpr1t+sw1ACJ7bz5BxZw6sv/bntCLMYZ/MxdsJMGzUD5M+cYYHUldMdY+E1a922wPR52BP4zb9 puY317GVbiYaY+5BA8hKmKEb0GF3Ygw0BkuVeSk2WUPt1pLDrHYRQD4iDnYhuVqJJctXLrfdk/Wcf jEhWlA780dOdOcrCL4l9UKh5hyf13wNzIxTGLO6+uBKmZXT/ISG3vwE8DtMy0qcuj2HnXi4WUlLYX tdhGi0NhrsgBYdparsa3yuMDsNjiqMoNk3g8UwOvyXyK+4GdJ3jEzZgdXsw56lvpmB/Wo9gME0zRk jh/u6wMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cg9DQ-0006ub-LD; Tue, 21 Feb 2017 12:06:44 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cg9BF-0004aw-VR for linux-arm-kernel@lists.infradead.org; Tue, 21 Feb 2017 12:04:34 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id F0279206E7; Tue, 21 Feb 2017 13:04:08 +0100 (CET) Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id C9BE220559; Tue, 21 Feb 2017 13:03:58 +0100 (CET) From: Alexandre Belloni To: Richard Genoud Subject: [PATCH] tty/serial: atmel: remove cache when unnecessary Date: Tue, 21 Feb 2017 13:03:57 +0100 Message-Id: <20170221120357.13623-2-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170221120357.13623-1-alexandre.belloni@free-electrons.com> References: <20170221120357.13623-1-alexandre.belloni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170221_040430_873256_B3A268D4 X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Nicolas Ferre , Alexandre Belloni , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP struct cache is only used in suspend/resume. Exclude it when PM is not selected. Suggested-by: Richard Genoud Signed-off-by: Alexandre Belloni Acked-by: Richard Genoud --- drivers/tty/serial/atmel_serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index dcebb28ffbc4..f0d4894267c2 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -175,6 +175,7 @@ struct atmel_uart_port { unsigned int pending_status; spinlock_t lock_suspended; +#ifdef CONFIG_PM struct { u32 cr; u32 mr; @@ -185,6 +186,7 @@ struct atmel_uart_port { u32 fmr; u32 fimr; } cache; +#endif int (*prepare_rx)(struct uart_port *port); int (*prepare_tx)(struct uart_port *port);