From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753115AbcD3CJn (ORCPT ); Fri, 29 Apr 2016 22:09:43 -0400 Received: from ring0.de ([5.45.101.7]:43702 "EHLO ring0.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753005AbcD3CJg (ORCPT ); Fri, 29 Apr 2016 22:09:36 -0400 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail * domains are different * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] From: Sebastian Reichel To: Sebastian Reichel , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tony Lindgren , Aaro Koskinen , Pavel Machek , Ivaylo Dimitrov , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 4/6] HSI: omap_ssi: fix removal of port platform device Date: Sat, 30 Apr 2016 04:09:11 +0200 Message-Id: <1461982153-19139-5-git-send-email-sre@kernel.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1461982153-19139-1-git-send-email-sre@kernel.org> References: <1461982153-19139-1-git-send-email-sre@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This avoids removal of the HSI port device when only the platform port device should be removed and clears the POPULATED bit in the DT node, so that a new platform device is created when the driver is probed again. Signed-off-by: Sebastian Reichel --- drivers/hsi/controllers/omap_ssi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hsi/controllers/omap_ssi.c b/drivers/hsi/controllers/omap_ssi.c index ffb921482e76..68dfdaa19938 100644 --- a/drivers/hsi/controllers/omap_ssi.c +++ b/drivers/hsi/controllers/omap_ssi.c @@ -451,6 +451,10 @@ static int ssi_remove_ports(struct device *dev, void *c) { struct platform_device *pdev = to_platform_device(dev); + if (!dev->of_node) + return 0; + + of_node_clear_flag(dev->of_node, OF_POPULATED); of_device_unregister(pdev); return 0; -- 2.8.1