From 15d41de1eb68befe2445e5b7f89276648911da62 Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Mon, 20 Jan 2014 10:22:55 +0000 Subject: [PATCH] generic: ar8216: allow to use chip specific cleanup callback It will be used for AR8327. Signed-off-by: Gabor Juhos SVN-Revision: 39337 --- target/linux/generic/files/drivers/net/phy/ar8216.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- 2.30.2