On Fri, Jul 13, 2012 at 08:19:04AM +0200, Wojciech Dubowik wrote:
> >-#ifndef CONFIG_ATHEROS_AR231X
> >     struct pci_dev *pdev = ah->pdev;
> >-#endif
> >     char name[ATH5K_LED_MAX_NAME_LEN + 1];
> >     const struct pci_device_id *match;
> >     if (!ah->pdev)
> >             return 0;
> >-#ifdef CONFIG_ATHEROS_AR231X
> >-    match = NULL;
> >-#else
> >     match = pci_match_id(&ath5k_led_devices[0], pdev);
> >-#endif
>
> Some AR231x platforms don't have pci and the code crashed at least here.

It shouldn't even reach here since we have "if (!ah->pdev)" before that,
and as far as I can tell, ah->pdev is only assigned in pci.c.

(The broken case is actually AR231X with PCI, if there is such a thing:
in that case it looks like neither ATH5K_PCI nor _AHB are selected?)

I'm also not a fan of platform details (AR5K_AR2315_PCI_BASE) leaking into
the driver, but I can live with it if there's anyone using the code.

> ... or sombeody could port AR231x code from OpenWrt upstream but it's
> maybe a waste of resources for such an old chipset.

I took a look, it seems we're only missing a few KLOC board file.  Either
it's worthwhile to add that, or it isn't worthwhile to keep this stuff.

Despite not having the HW, I wouldn't even mind doing the legwork, but
it'd probably be best if the original authors (Felix?) did so since they
better know the code and its provenance.

-- 
Bob Copeland %% www.bobcopeland.com
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to