Gabor Juhos wrote:
> Sujith  rta:
> > Gabor Juhos wrote:
> >> +static bool ath_ahb_eeprom_read(struct ath_hal *ah, u32 off, u16 *data)
> >> +{
> >> +    struct ath_softc *sc = ah->ah_sc;
> >> +    struct platform_device *pdev = to_platform_device(sc->dev);
> >> +    struct ath9k_platform_data *pdata;
> >> +
> >> +    pdata = (struct ath9k_platform_data *) pdev->dev.platform_data;
> >> +    if (off >= (ARRAY_SIZE(pdata->eeprom_data))) {
> >> +            DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
> >> +                    "%s: flash read failed, offset %08x is out of 
> >> range\n",
> >> +                            __func__, off);
> >> +            return false;
> >> +    }
> >> +
> >> +    *data = pdata->eeprom_data[off];
> >> +    return true;
> >> +}
> >> +
> >
> > Shouldn't pdev->dev.platform_data be initalized somewhere ?
> 
> It must be initialized by the board specific setup code,
> 

Ok.

Sujith
_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to