Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 35544
+static void
+ar8xxx_free(struct ar8216_priv *priv)
+{
+ kfree(priv);
+}
+
static struct ar8216_priv *
ar8xxx_create_mii(struct mii_bus *bus)
{
static struct ar8216_priv *
ar8xxx_create_mii(struct mii_bus *bus)
{
/* check if we're attaching to the switch twice */
pdev = pdev->bus->phy_map[0];
if (!pdev) {
/* check if we're attaching to the switch twice */
pdev = pdev->bus->phy_map[0];
if (!pdev) {
/* switch device has been initialized, reinit */
priv = pdev->priv;
/* switch device has been initialized, reinit */
priv = pdev->priv;
err_cleanup_mib:
ar8xxx_mib_cleanup(priv);
err_free_priv:
err_cleanup_mib:
ar8xxx_mib_cleanup(priv);
err_free_priv:
pdev->priv = NULL;
return ret;
}
pdev->priv = NULL;
return ret;
}
priv->phy = pdev;
ret = ar8216_id_chip(priv);
priv->phy = pdev;
ret = ar8216_id_chip(priv);
unregister_switch(&priv->dev);
ar8xxx_mib_cleanup(priv);
unregister_switch(&priv->dev);
ar8xxx_mib_cleanup(priv);
}
static struct phy_driver ar8216_driver = {
}
static struct phy_driver ar8216_driver = {