]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/wireless/ath/ath5k/led.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / net / wireless / ath / ath5k / led.c
index 67aa52e9bf9404a581c7084d12f058f21df13bbc..576edf2965dc0acd46c035aa0180eb9fb42fe670 100644 (file)
@@ -133,7 +133,7 @@ ath5k_register_led(struct ath5k_softc *sc, struct ath5k_led *led,
        led->led_dev.default_trigger = trigger;
        led->led_dev.brightness_set = ath5k_led_brightness_set;
 
-       err = led_classdev_register(&sc->pdev->dev, &led->led_dev);
+       err = led_classdev_register(sc->dev, &led->led_dev);
        if (err) {
                ATH5K_WARN(sc, "could not register LED %s\n", name);
                led->sc = NULL;
@@ -161,11 +161,20 @@ int ath5k_init_leds(struct ath5k_softc *sc)
 {
        int ret = 0;
        struct ieee80211_hw *hw = sc->hw;
+#ifndef CONFIG_ATHEROS_AR231X
        struct pci_dev *pdev = sc->pdev;
+#endif
        char name[ATH5K_LED_MAX_NAME_LEN + 1];
        const struct pci_device_id *match;
 
+       if (!sc->pdev)
+               return 0;
+
+#ifdef CONFIG_ATHEROS_AR231X
+       match = NULL;
+#else
        match = pci_match_id(&ath5k_led_devices[0], pdev);
+#endif
        if (match) {
                __set_bit(ATH_STAT_LEDSOFT, sc->status);
                sc->led_pin = ATH_PIN(match->driver_data);