Re: [Madwifi-devel] [PATCH] fix type-warning message in madwifi/ath/if_ath_pci.c
Status: Beta
Brought to you by:
otaku
From: Kel M. <ke...@tp...> - 2006-01-26 05:06:04
|
Kel Modderman wrote: > Lukas Ruf wrote: > >> Dear all, >> >> >> >>> Lukas Ruf <ru...@ra...> [2006-01-24 11:10]: >>> >>> please find attached a minor patch that fixes a compile-time type >>> error message in madwifi/ath/if_ath_pci.c for 2.6.15. >>> >>> >> >> >> The attached path fixes a compile-time type-warning message >> in madwifi/ath/if_ath_pci.c. For compatibility with Linux 2.4 >> kernels, it adds the appropriate defines as suggested by Kel >> Modderman. >> >> Signed-off-by: Lukas Ruf <ru...@ra...> >> >> >> >> ------------------------------------------------------------------------ >> >> Index: madwifi/ath/if_ath_pci.c >> =================================================================== >> --- madwifi/ath/if_ath_pci.c (revision 1415) >> +++ madwifi/ath/if_ath_pci.c (working copy) >> @@ -55,6 +55,16 @@ >> >> #include <linux/pci.h> >> >> +#ifdef CONFIG_PM >> +#include <linux/pm.h> >> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) >> +#ifndef pm_message_t >> +#define pm_message_t u32 >> +#endif /* pm_message_t */ >> +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) */ >> +#endif /* CONFIG_PM */ >> + >> + >> #include <asm/uaccess.h> >> >> #include "if_media.h" >> @@ -253,7 +263,7 @@ >> >> #ifdef CONFIG_PM >> static int >> -ath_pci_suspend(struct pci_dev *pdev, u32 state) >> +ath_pci_suspend(struct pci_dev *pdev, pm_message_t state) >> { >> struct net_device *dev = pci_get_drvdata(pdev); >> >> >> > Just as soon as I had replied, the rt2x00 devs just removed the check > for (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) which makes sense > because: > > #ifndef pm_message_t > #define pm_message_t u32 > #endif /* pm_message_t */ > > should be sufficient to catch the lack of pm_message_t, no? I thought > it looked a bit crowded when i sent that advise to you . . . > > Thanks, Kel. > > . . . and it makes it even worse advice that ath/if_ath_pci.h already has: #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) #define pm_message_t u32 #endif Sorry for the stuff around. Kel |