Ignore:
Timestamp:
2012-03-18T23:06:15+01:00 (5 years ago)
Author:
juhosg
Message:

generic: ar8216: add hw_init field to ar8xxx_chip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/drivers/net/phy/ar8216.c

    r30997 r30998  
    3737#define AR8X16_PROBE_RETRIES    10 
    3838 
     39struct ar8216_priv; 
     40 
    3941struct ar8xxx_chip { 
     42        int (*hw_init)(struct ar8216_priv *priv); 
    4043}; 
    4144 
     
    742745 
    743746static const struct ar8xxx_chip ar8216_chip = { 
     747        .hw_init = ar8216_hw_init, 
    744748}; 
    745749 
    746750static const struct ar8xxx_chip ar8236_chip = { 
     751        .hw_init = ar8236_hw_init, 
    747752}; 
    748753 
    749754static const struct ar8xxx_chip ar8316_chip = { 
     755        .hw_init = ar8316_hw_init, 
    750756}; 
    751757 
     
    944950        priv->init = true; 
    945951 
    946         ret = 0; 
    947         if (priv->chip_type == AR8216) 
    948                 ret = ar8216_hw_init(priv); 
    949         else if (priv->chip_type == AR8236) 
    950                 ret = ar8236_hw_init(priv); 
    951         else if (priv->chip_type == AR8316) 
    952                 ret = ar8316_hw_init(priv); 
    953  
     952        ret = priv->chip->hw_init(priv); 
    954953        if (ret) 
    955954                goto err_free_priv; 
Note: See TracChangeset for help on using the changeset viewer.