Re: [PATCH] staging: remove all code dependent onLINUX_VERSION_CODE

From: Jiri Kosina
Date: Tue May 25 2010 - 08:17:01 EST


On Tue, 25 May 2010, Andreas Schwab wrote:

> > diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
> > index 134e756..ace28c7 100644
> > --- a/drivers/staging/cxt1e1/linux.c
> > +++ b/drivers/staging/cxt1e1/linux.c
>
> > @@ -1341,9 +1226,6 @@ module_exit (c4_mod_remove);
> >
> > #ifndef SBE_INCLUDE_SYMBOLS
> > #ifndef CONFIG_SBE_WANC24_NCOMM
> > -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
> > -EXPORT_NO_SYMBOLS;
> > -#endif
> > #endif
> > #endif
>
> This is now empty.

Thanks. Hmm ... seems my automated thingie wasn't really smart enough.

> > diff --git a/drivers/staging/cxt1e1/sbecom_inline_linux.h b/drivers/staging/cxt1e1/sbecom_inline_linux.h
> > index c65172d..5a72cb5 100644
> > --- a/drivers/staging/cxt1e1/sbecom_inline_linux.h
> > +++ b/drivers/staging/cxt1e1/sbecom_inline_linux.h
>
> > @@ -60,12 +57,8 @@
> >
> > #ifdef MODULE
> > #ifdef MODVERSIONS
> > -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
> > -#include <linux/modversions.h>
> > -#else
> > #include <config/modversions.h>
> > #endif
> > -#endif
>
> This should be removed altogether.

Yeah, but I'd like to keep that in a separate patch.

> > diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
> > index 50728f6..02594fd 100644
> > --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h
> > +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
>
> > @@ -2329,36 +2246,20 @@ struct ieee80211_device {
> >
> > /* used if IEEE_SOFTMAC_BEACONS is set */
> > struct timer_list beacon_timer;
> > -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
> > struct work_struct associate_complete_wq;
> > struct work_struct associate_procedure_wq;
> > -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
> > struct delayed_work softmac_scan_wq;
> > struct delayed_work associate_retry_wq;
> > struct delayed_work start_ibss_wq;
> > struct delayed_work hw_wakeup_wq;
> > struct delayed_work hw_sleep_wq;
> > -#else
> > struct work_struct softmac_scan_wq;
> > struct work_struct associate_retry_wq;
> > struct work_struct start_ibss_wq;
> > struct work_struct hw_wakeup_wq;
> > struct work_struct hw_sleep_wq;
> > -#endif
>
> The #else branch needs to be fully removed.

Thanks for spotting that.

> > diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
> > index 46b6e8c..a60b001 100644
> > --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
> > +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
>
> > @@ -704,16 +658,10 @@ void ieee80211_rtl_start_scan(struct ieee80211_device *ieee)
> > if (ieee->softmac_features & IEEE_SOFTMAC_SCAN){
> > if (ieee->scanning == 0){
> > ieee->scanning = 1;
> > -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
> > -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
> > queue_delayed_work(ieee->wq, &ieee->softmac_scan_wq, 0);
> > -#else
> >
> > queue_work(ieee->wq, &ieee->softmac_scan_wq);
> > -#endif
> > -#else
> > ieee80211_softmac_scan(ieee);
> > -#endif
>
> Likewise.

Thanks for the review. Updated patch below.