generic: ar8216: don't probe the chip multiple times
It is only needed when the private data is allocated. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35538
This commit is contained in:
parent
774da6c7a4
commit
5ed480598d
1 changed files with 8 additions and 8 deletions
|
@ -1780,18 +1780,18 @@ ar8216_config_init(struct phy_device *pdev)
|
|||
priv = kzalloc(sizeof(struct ar8216_priv), GFP_KERNEL);
|
||||
if (priv == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
priv->mii_bus = pdev->bus;
|
||||
priv->read = ar8216_mii_read;
|
||||
priv->write = ar8216_mii_write;
|
||||
|
||||
ret = ar8216_id_chip(priv);
|
||||
if (ret)
|
||||
goto err_free_priv;
|
||||
}
|
||||
|
||||
priv->mii_bus = pdev->bus;
|
||||
priv->read = ar8216_mii_read;
|
||||
priv->write = ar8216_mii_write;
|
||||
|
||||
priv->phy = pdev;
|
||||
|
||||
ret = ar8216_id_chip(priv);
|
||||
if (ret)
|
||||
goto err_free_priv;
|
||||
|
||||
if (ar8xxx_has_gige(priv))
|
||||
pdev->supported = SUPPORTED_1000baseT_Full;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue