b8be23
From patchwork Wed Oct 26 15:17:01 2016
b8be23
Content-Type: text/plain; charset="utf-8"
b8be23
MIME-Version: 1.0
b8be23
Content-Transfer-Encoding: 7bit
b8be23
Subject: [3/5] ARM: OMAP4+: Fix bad fallthrough for cpuidle
b8be23
From: Tony Lindgren <tony@atomide.com>
b8be23
X-Patchwork-Id: 9397501
b8be23
Message-Id: <20161026151703.24730-4-tony@atomide.com>
b8be23
To: linux-omap@vger.kernel.org
b8be23
Cc: Nishanth Menon <nm@ti.com>, Dmitry Lifshitz <lifshitz@compulab.co.il>,
b8be23
 Dave Gerlach <d-gerlach@ti.com>,
b8be23
 Enric Balletbo Serra <eballetbo@gmail.com>, 
b8be23
 "Dr . H . Nikolaus Schaller" <hns@goldelico.com>,
b8be23
 Pau Pajuel <ppajuel@gmail.com>, Grazvydas Ignotas <notasas@gmail.com>,
b8be23
 Benoit Cousson <bcousson@baylibre.com>,
b8be23
 Santosh Shilimkar <ssantosh@kernel.org>,
b8be23
 Javier Martinez Canillas <javier@dowhile0.org>,
b8be23
 Robert Nelson <robertcnelson@gmail.com>,
b8be23
 Marek Belisko <marek@goldelico.com>, linux-arm-kernel@lists.infradead.org
b8be23
Date: Wed, 26 Oct 2016 08:17:01 -0700
b8be23
b8be23
We don't want to fall through to a bunch of errors for retention
b8be23
if PM_OMAP4_CPU_OSWR_DISABLE is not configured for a SoC.
b8be23
b8be23
Fixes: 6099dd37c669 ("ARM: OMAP5 / DRA7: Enable CPU RET on suspend")
b8be23
Signed-off-by: Tony Lindgren <tony@atomide.com>
b8be23
---
b8be23
 arch/arm/mach-omap2/omap-mpuss-lowpower.c | 5 ++---
b8be23
 1 file changed, 2 insertions(+), 3 deletions(-)
b8be23
b8be23
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
b8be23
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
b8be23
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
b8be23
@@ -244,10 +244,9 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
b8be23
 		save_state = 1;
b8be23
 		break;
b8be23
 	case PWRDM_POWER_RET:
b8be23
-		if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) {
b8be23
+		if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE))
b8be23
 			save_state = 0;
b8be23
-			break;
b8be23
-		}
b8be23
+		break;
b8be23
 	default:
b8be23
 		/*
b8be23
 		 * CPUx CSWR is invalid hardware state. Also CPUx OSWR
bce070
From 5a78ff7bf7e25191144b550961001bbf6c734da4 Mon Sep 17 00:00:00 2001
bce070
From: Peter Chen <peter.chen@nxp.com>
bce070
Date: Thu, 11 Aug 2016 17:44:54 +0800
bce070
Subject: [PATCH 04152/16809] Revert "gpu: drm: omapdrm: dss-of: add missing
bce070
 of_node_put after calling of_parse_phandle"
bce070
bce070
This reverts
bce070
commit 2ab9f5879162499e1c4e48613287e3f59e593c4f
bce070
Author: Peter Chen <peter.chen@nxp.com>
bce070
Date:   Fri Jul 15 11:17:03 2016 +0800
bce070
    gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle
bce070
bce070
The of_get_next_parent will drop refcount on the passed node, so the reverted
bce070
patch is wrong, thanks for Tomi Valkeinen points it.
bce070
bce070
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
bce070
Signed-off-by: Peter Chen <peter.chen@nxp.com>
bce070
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
bce070
Signed-off-by: Sean Paul <seanpaul@chromium.org>
bce070
Link: http://patchwork.freedesktop.org/patch/msgid/1470908694-16362-1-git-send-email-peter.chen@nxp.com
bce070
---
bce070
 drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 +++----
bce070
 1 file changed, 3 insertions(+), 4 deletions(-)
bce070
bce070
diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c b/drivers/gpu/drm/omapdrm/dss/dss-of.c
bce070
index e256d87..dfd4e96 100644
bce070
--- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
bce070
+++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
bce070
@@ -125,16 +125,15 @@ u32 dss_of_port_get_port_number(struct device_node *port)
bce070
 
bce070
 static struct device_node *omapdss_of_get_remote_port(const struct device_node *node)
bce070
 {
bce070
-	struct device_node *np, *np_parent;
bce070
+	struct device_node *np;
bce070
 
bce070
 	np = of_parse_phandle(node, "remote-endpoint", 0);
bce070
 	if (!np)
bce070
 		return NULL;
bce070
 
bce070
-	np_parent = of_get_next_parent(np);
bce070
-	of_node_put(np);
bce070
+	np = of_get_next_parent(np);
bce070
 
bce070
-	return np_parent;
bce070
+	return np;
bce070
 }
bce070
 
bce070
 struct device_node *
bce070
-- 
bce070
2.9.3
bce070