Changeset 36046


Ignore:
Timestamp:
2013-03-15T16:50:05+01:00 (5 years ago)
Author:
juhosg
Message:

generic: ar8216: separate platform_data based AR8327 code

Move platform_data specific configuration code
into a separate routine. Do it in preparation
for the upcoming OF support.

Signed-off-by: Gabor Juhos <juhosg@…>

File:
1 edited

Legend:

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

    r36045 r36046  
    10401040 
    10411041static int 
    1042 ar8327_hw_init(struct ar8xxx_priv *priv) 
    1043 { 
    1044         struct ar8327_platform_data *pdata; 
     1042ar8327_hw_config_pdata(struct ar8xxx_priv *priv, 
     1043                       struct ar8327_platform_data *pdata) 
     1044{ 
    10451045        struct ar8327_led_cfg *led_cfg; 
    10461046        struct ar8327_data *data; 
    1047         struct mii_bus *bus; 
    10481047        u32 pos, new_pos; 
    10491048        u32 t; 
    1050         int i; 
    1051  
    1052         pdata = priv->phy->dev.platform_data; 
     1049 
    10531050        if (!pdata) 
    10541051                return -EINVAL; 
     
    10861083                priv->write(priv, AR8327_REG_POWER_ON_STRIP, new_pos); 
    10871084        } 
     1085 
     1086        return 0; 
     1087} 
     1088 
     1089static int 
     1090ar8327_hw_init(struct ar8xxx_priv *priv) 
     1091{ 
     1092        struct mii_bus *bus; 
     1093        int ret; 
     1094        int i; 
     1095 
     1096        ret = ar8327_hw_config_pdata(priv, priv->phy->dev.platform_data); 
     1097        if (ret) 
     1098                return ret; 
    10881099 
    10891100        bus = priv->mii_bus; 
Note: See TracChangeset for help on using the changeset viewer.