diff options
Diffstat (limited to 'wct4xxp')
-rw-r--r-- | wct4xxp/vpm450m.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/wct4xxp/vpm450m.c b/wct4xxp/vpm450m.c index a12b435..674dd49 100644 --- a/wct4xxp/vpm450m.c +++ b/wct4xxp/vpm450m.c @@ -10,10 +10,17 @@ #include <linux/vmalloc.h> #include <linux/string.h> #include <linux/time.h> +#include <linux/version.h> #include "vpm450m.h" #include "oct6100api/oct6100_api.h" +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) +#include <linux/config.h> +#else +#include <linux/autoconf.h> +#endif + /* API for Octasic access */ UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime) { @@ -407,7 +414,9 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f UINT32 ulResult; struct vpm450m *vpm450m; int x,y,law; +#ifdef CONFIG_4KSTACKS unsigned long flags; +#endif if (!(vpm450m = kmalloc(sizeof(struct vpm450m), GFP_KERNEL))) return NULL; @@ -482,11 +491,15 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f * stack unfriendly. Stupid, stupid, stupid. So we disable IRQs so we * don't run the risk of overflowing the stack while we initialize the * octasic. */ +#ifdef CONFIG_4KSTACKS local_irq_save(flags); +#endif ulResult = Oct6100ChipOpen(vpm450m->pApiInstance, ChipOpen); if (ulResult != cOCT6100_ERR_OK) { printk("Failed to open chip, code %08x!\n", ulResult); +#ifdef CONFIG_4KSTACKS local_irq_restore(flags); +#endif kfree(vpm450m); kfree(ChipOpen); kfree(ChannelOpen); @@ -541,7 +554,9 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f } } +#ifdef CONFIG_4KSTACKS local_irq_restore(flags); +#endif kfree(ChipOpen); kfree(ChannelOpen); return vpm450m; |