Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752712AbdHNW1M (ORCPT ); Mon, 14 Aug 2017 18:27:12 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:40250 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752576AbdHNW1J (ORCPT ); Mon, 14 Aug 2017 18:27:09 -0400 From: Vivien Didelot To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli , Andrew Lunn , Egil Hjelmeland , John Crispin , Woojung Huh , Sean Wang , Volodymyr Bendiuga , Nikita Yushchenko , Maxime Hadjinlian , Chris Healy , Maxim Uvarov , Stefan Eichenberger , Jason Cobham , Juergen Borleis , Tobias Waldekranz , Vivien Didelot Subject: [PATCH net-next 01/11] net: dsa: legacy: assign dst->applied Date: Mon, 14 Aug 2017 18:22:32 -0400 Message-Id: <20170814222242.10643-2-vivien.didelot@savoirfairelinux.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170814222242.10643-1-vivien.didelot@savoirfairelinux.com> References: <20170814222242.10643-1-vivien.didelot@savoirfairelinux.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 818 Lines: 31 The "applied" boolean of the dsa_switch_tree is only set in the new bindings. This patch sets it in the legacy code as well. Signed-off-by: Vivien Didelot --- net/dsa/legacy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c index 91e6f7981d39..a6a0849483d1 100644 --- a/net/dsa/legacy.c +++ b/net/dsa/legacy.c @@ -605,6 +605,7 @@ static int dsa_setup_dst(struct dsa_switch_tree *dst, struct net_device *dev, */ wmb(); dev->dsa_ptr = dst; + dst->applied = true; return 0; } @@ -689,6 +690,8 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst) dsa_cpu_port_ethtool_restore(dst->cpu_dp); dev_put(dst->cpu_dp->netdev); + + dst->applied = false; } static int dsa_remove(struct platform_device *pdev) -- 2.14.0