diff options
author | sam <sam@FreeBSD.org> | 2008-12-13 03:50:31 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-12-13 03:50:31 +0000 |
commit | 477666d0ad0d8897c20b61df3484a084fccd3840 (patch) | |
tree | 4045e511e7f0566346fcdb3a0a725caf190328ae | |
parent | e81e2cd9cfdc132b87d35314cbcf3797276ee378 (diff) | |
download | FreeBSD-src-477666d0ad0d8897c20b61df3484a084fccd3840.zip FreeBSD-src-477666d0ad0d8897c20b61df3484a084fccd3840.tar.gz |
o remove dead code
o fix AH_RF macro expansion to be as intended (worked before unintentionally)
Obtained from: netbsd
-rw-r--r-- | sys/dev/ath/ath_hal/ah_internal.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/sys/dev/ath/ath_hal/ah_internal.h b/sys/dev/ath/ath_hal/ah_internal.h index da09c68..9feb295 100644 --- a/sys/dev/ath/ath_hal/ah_internal.h +++ b/sys/dev/ath/ath_hal/ah_internal.h @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_internal.h,v 1.21 2008/11/27 22:29:27 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_INTERAL_H_ #define _ATH_AH_INTERAL_H_ @@ -42,23 +42,6 @@ #define offsetof(type, field) ((size_t)(&((type *)0)->field)) #endif -/* - * Remove const in a way that keeps the compiler happy. - * This works for gcc but may require other magic for - * other compilers (not sure where this should reside). - * Note that uintptr_t is C99. - */ -#ifndef __DECONST -#ifndef _UINTPTR_T -#if AH_WORDSIZE == 64 -typedef unsigned long int uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif -#endif -#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) -#endif - typedef struct { uint16_t start; /* first register */ uint16_t end; /* ending register or zero */ @@ -114,12 +97,12 @@ struct ath_hal_rf { }; #ifndef AH_RF #define AH_RF(_name, _probe, _attach) \ -static struct ath_hal_rf name##_rf = { \ - .name = #_name, \ +static struct ath_hal_rf _name##_rf = { \ + .name = __STRING(_name), \ .probe = _probe, \ .attach = _attach \ }; \ -OS_DATA_SET(ah_rfs, name##_rf) +OS_DATA_SET(ah_rfs, _name##_rf) #endif struct ath_hal_rf *ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode); |