aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2014-01-20 10:22:55 +0000
committerGabor Juhos <juhosg@openwrt.org>2014-01-20 10:22:55 +0000
commit313b62670594f5c9f77ceb46d90a3ef4537b0be5 (patch)
treea04b4a6b4fb3bd91441bf7d11195f8c6c9cc9aee /target/linux/generic
parentc0ce66837e0981b2eb70a347beb305d172b28aa1 (diff)
downloadupstream-313b62670594f5c9f77ceb46d90a3ef4537b0be5.tar.gz
upstream-313b62670594f5c9f77ceb46d90a3ef4537b0be5.tar.bz2
upstream-313b62670594f5c9f77ceb46d90a3ef4537b0be5.zip
generic: ar8216: allow to use chip specific cleanup callback
It will be used for AR8327. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39337 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 884b3199c1..e9782f5a7e 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -67,6 +67,8 @@ struct ar8xxx_chip {
unsigned long caps;
int (*hw_init)(struct ar8xxx_priv *priv);
+ void (*cleanup)(struct ar8xxx_priv *priv);
+
void (*init_globals)(struct ar8xxx_priv *priv);
void (*init_port)(struct ar8xxx_priv *priv, int port);
void (*setup_port)(struct ar8xxx_priv *priv, int port, u32 egress,
@@ -2234,6 +2236,9 @@ ar8xxx_create(void)
static void
ar8xxx_free(struct ar8xxx_priv *priv)
{
+ if (priv->chip && priv->chip->cleanup)
+ priv->chip->cleanup(priv);
+
kfree(priv->mib_stats);
kfree(priv);
}