led.c (a02001086bbfb4da35d1228bebc2f1b442db455f) led.c (0e5d3ab532dd6bd43406d91b1dacb391973f831f)
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 *

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

158 ath5k_unregister_led(&ah->rx_led);
159 ath5k_unregister_led(&ah->tx_led);
160}
161
162int ath5k_init_leds(struct ath5k_hw *ah)
163{
164 int ret = 0;
165 struct ieee80211_hw *hw = ah->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 *

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

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

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

--- 16 unchanged lines hidden ---