led.c (8efa5d7d6ad307ae2d220def37ca89594062c40d) led.c (a0b907ee2a71052fefdf6151764095f3f97b3275)
1/*
2 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
3 * Copyright (c) 2004-2005 Atheros Communications, Inc.
4 * Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com>
5 * Copyright (c) 2009 Bob Copeland <me@bobcopeland.com>
6 *
7 * All rights reserved.
8 *

--- 147 unchanged lines hidden (view full) ---

156 ath5k_unregister_led(&sc->rx_led);
157 ath5k_unregister_led(&sc->tx_led);
158}
159
160int ath5k_init_leds(struct ath5k_softc *sc)
161{
162 int ret = 0;
163 struct ieee80211_hw *hw = sc->hw;
1/*
2 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
3 * Copyright (c) 2004-2005 Atheros Communications, Inc.
4 * Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com>
5 * Copyright (c) 2009 Bob Copeland <me@bobcopeland.com>
6 *
7 * All rights reserved.
8 *

--- 147 unchanged lines hidden (view full) ---

156 ath5k_unregister_led(&sc->rx_led);
157 ath5k_unregister_led(&sc->tx_led);
158}
159
160int ath5k_init_leds(struct ath5k_softc *sc)
161{
162 int ret = 0;
163 struct ieee80211_hw *hw = sc->hw;
164#ifndef CONFIG_ATHEROS_AR231X
164 struct pci_dev *pdev = sc->pdev;
165 struct pci_dev *pdev = sc->pdev;
166#endif
165 char name[ATH5K_LED_MAX_NAME_LEN + 1];
166 const struct pci_device_id *match;
167
168 if (!sc->pdev)
169 return 0;
170
167 char name[ATH5K_LED_MAX_NAME_LEN + 1];
168 const struct pci_device_id *match;
169
170 if (!sc->pdev)
171 return 0;
172
173#ifdef CONFIG_ATHEROS_AR231X
174 match = NULL;
175#else
171 match = pci_match_id(&ath5k_led_devices[0], pdev);
176 match = pci_match_id(&ath5k_led_devices[0], pdev);
177#endif
172 if (match) {
173 __set_bit(ATH_STAT_LEDSOFT, sc->status);
174 sc->led_pin = ATH_PIN(match->driver_data);
175 sc->led_on = ATH_POLARITY(match->driver_data);
176 }
177
178 if (!test_bit(ATH_STAT_LEDSOFT, sc->status))
179 goto out;

--- 16 unchanged lines hidden ---
178 if (match) {
179 __set_bit(ATH_STAT_LEDSOFT, sc->status);
180 sc->led_pin = ATH_PIN(match->driver_data);
181 sc->led_on = ATH_POLARITY(match->driver_data);
182 }
183
184 if (!test_bit(ATH_STAT_LEDSOFT, sc->status))
185 goto out;

--- 16 unchanged lines hidden ---