From patchwork Wed Oct 28 14:13:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 537345 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id AA726141304 for ; Thu, 29 Oct 2015 01:13:53 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre_com.20150623.gappssmtp.com header.i=@baylibre_com.20150623.gappssmtp.com header.b=m8R/acBo; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966345AbbJ1ONi (ORCPT ); Wed, 28 Oct 2015 10:13:38 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:36141 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965994AbbJ1ONf (ORCPT ); Wed, 28 Oct 2015 10:13:35 -0400 Received: by wicfx6 with SMTP id fx6so199893242wic.1 for ; Wed, 28 Oct 2015 07:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre_com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:organization:message-id:date:user-agent :mime-version:content-type:content-transfer-encoding; bh=iNiLikY0f9S7ak6Ha7c8KxMjTPIZQ+J7GfZBSLDf7lE=; b=m8R/acBoX4dHV1w2H49w2SclqdO7JH1EhcaxB5Ws5a0yJI8ZF58DWIeSa/XC1FuZx6 ryIMwU5JurJBejjuvl9b5jtD5ZGVALLWqPkMcTAPsE2thNYH3Eb7flKTu71bkUkobebu RfbsholHCcQI7CcOKOHv925k/YDtiJtFJuP9/3TdbeaVneGjTYQ79/5VWxXShbr3WO2Q /VvB040v+PkXCw2Dleq+6dV1ijkKghCtjIaGnLBa1Wkm2yjaSmcgXODaui7j1n5E5+y0 kO+wXM78mPK8UJ18CcvSOi/DpKIslwTWtGvIyGkz4v1IhNSSIdGqeb3nJReoFZYRpyRl 2Qxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:cc:organization:message-id:date :user-agent:mime-version:content-type:content-transfer-encoding; bh=iNiLikY0f9S7ak6Ha7c8KxMjTPIZQ+J7GfZBSLDf7lE=; b=IpOHQhLpJGJD5j9Kf/V5wqb0gLCbqs7rwRgqSxjZUIsq/IvCuGBBrkMydBApMjL9Qw 86Z8crP3dyIzSdn+KB2Nk8L4znONVDMkQdnJmuC6EKcrdnlZDSz5IRtIWjy3xcMMMZHU LyoDfuqcHK81BN9/5tQ8YUGsA9z1D3cr56aUUUtJIzl990roOWEqFFPRMcKCNAQHu+F3 SzdH40/bnCHGPrC/LzN86RMlY+1TgjAs8SkdEdu1ErdliAoDLoClOzou9fLBsEAYGHh9 6HivfvdeWGA6ejit5IgjDcI6TGoLQj+8uytYzDzmgrsTLxcj4LGd39toi3C1VrB/DIoR MY/g== X-Gm-Message-State: ALoCoQld1Zekyd0s+VeO3nJJUEzeLwzaB1NVrJ+iMK6tlWjjIDnoP3ckL8lZiX6SFPkD4JtfhcEH X-Received: by 10.194.8.3 with SMTP id n3mr36459310wja.82.1446041613854; Wed, 28 Oct 2015 07:13:33 -0700 (PDT) Received: from [192.168.2.52] (cag06-6-78-235-100-105.fbx.proxad.net. [78.235.100.105]) by smtp.gmail.com with ESMTPSA id 197sm4609405wmx.23.2015.10.28.07.13.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Oct 2015 07:13:33 -0700 (PDT) From: Neil Armstrong Subject: [RFC PATCH v2 4/4] net: dsa: make usage of mv88e6xxx common remove function To: "David S. Miller" Cc: Andrew Lunn , Florian Fainelli , Guenter Roeck , vivien.didelot@savoirfairelinux.com, Fabian Frederick , Pavel Nakonechny , Joe Perches , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Organization: Baylibre Message-ID: <5630D808.2070809@baylibre.com> Date: Wed, 28 Oct 2015 15:13:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Make usage of previously introduced mv88e6xxx common remove function in all mv88e6xxx drivers. Signed-off-by: Neil Armstrong --- drivers/net/dsa/mv88e6123_61_65.c | 1 + drivers/net/dsa/mv88e6131.c | 8 ++++++++ drivers/net/dsa/mv88e6171.c | 1 + drivers/net/dsa/mv88e6352.c | 1 + 4 files changed, 11 insertions(+) diff --git a/drivers/net/dsa/mv88e6123_61_65.c b/drivers/net/dsa/mv88e6123_61_65.c index 4bcfd68..1773c99 100644 --- a/drivers/net/dsa/mv88e6123_61_65.c +++ b/drivers/net/dsa/mv88e6123_61_65.c @@ -122,6 +122,7 @@ struct dsa_switch_driver mv88e6123_61_65_switch_driver = { .priv_size = sizeof(struct mv88e6xxx_priv_state), .probe = mv88e6123_61_65_probe, .setup = mv88e6123_61_65_setup, + .remove = mv88e6xxx_remove_common, .set_addr = mv88e6xxx_set_addr_indirect, .phy_read = mv88e6xxx_phy_read, .phy_write = mv88e6xxx_phy_write, diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c index c73121c..0f559b4 100644 --- a/drivers/net/dsa/mv88e6131.c +++ b/drivers/net/dsa/mv88e6131.c @@ -137,6 +137,13 @@ static int mv88e6131_setup(struct dsa_switch *ds) return mv88e6xxx_setup_ports(ds); } +static void mv88e6131_remove(struct dsa_switch *ds) +{ + mv88e6xxx_ppu_state_remove(ds); + + mv88e6xxx_remove_common(ds); +} + static int mv88e6131_port_to_phy_addr(struct dsa_switch *ds, int port) { struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); @@ -175,6 +182,7 @@ struct dsa_switch_driver mv88e6131_switch_driver = { .priv_size = sizeof(struct mv88e6xxx_priv_state), .probe = mv88e6131_probe, .setup = mv88e6131_setup, + .remove = mv88e6131_remove, .set_addr = mv88e6xxx_set_addr_direct, .phy_read = mv88e6131_phy_read, .phy_write = mv88e6131_phy_write, diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c index 2c8eb6f..382529b 100644 --- a/drivers/net/dsa/mv88e6171.c +++ b/drivers/net/dsa/mv88e6171.c @@ -101,6 +101,7 @@ struct dsa_switch_driver mv88e6171_switch_driver = { .priv_size = sizeof(struct mv88e6xxx_priv_state), .probe = mv88e6171_probe, .setup = mv88e6171_setup, + .remove = mv88e6xxx_remove_common, .set_addr = mv88e6xxx_set_addr_indirect, .phy_read = mv88e6xxx_phy_read_indirect, .phy_write = mv88e6xxx_phy_write_indirect, diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c index cbf4dd8..7938901 100644 --- a/drivers/net/dsa/mv88e6352.c +++ b/drivers/net/dsa/mv88e6352.c @@ -321,6 +321,7 @@ struct dsa_switch_driver mv88e6352_switch_driver = { .priv_size = sizeof(struct mv88e6xxx_priv_state), .probe = mv88e6352_probe, .setup = mv88e6352_setup, + .remove = mv88e6xxx_remove_common, .set_addr = mv88e6xxx_set_addr_indirect, .phy_read = mv88e6xxx_phy_read_indirect, .phy_write = mv88e6xxx_phy_write_indirect,