more 2.4 changes
This commit is contained in:
parent
11516beb36
commit
5e21b42424
|
@ -6,7 +6,7 @@ DESTDIR =
|
|||
KDIR := /usr/src/linux
|
||||
|
||||
TARGET := newhisax
|
||||
TARGETS := Rules.make arch $(TARGET)
|
||||
TARGETS := Rules.make arch scripts .config include $(TARGET)
|
||||
TARGETDIR := drivers/isdn/hisax
|
||||
|
||||
default: $(TARGETS)
|
||||
|
@ -16,17 +16,29 @@ all: $(TARGETS)
|
|||
Rules.make: $(KDIR)/Rules.make
|
||||
cp -pf $(KDIR)/Rules.make .
|
||||
|
||||
.config: $(KDIR)/.config
|
||||
cp -pf $(KDIR)/.config .
|
||||
|
||||
arch: $(KDIR)/arch
|
||||
rm -f arch
|
||||
ln -s $(KDIR)/arch .
|
||||
|
||||
scripts: $(KDIR)/scripts
|
||||
rm -f scripts
|
||||
ln -s $(KDIR)/scripts
|
||||
|
||||
include: $(KDIR)/include
|
||||
rm -f include
|
||||
ln -s $(KDIR)/include
|
||||
|
||||
clean:
|
||||
rm -f $(TARGETS) $(TARGETDIR)/.*.flags $(TARGETDIR)/*.o
|
||||
rm -f $(TARGETDIR)/*~ include/linux/*~ *~ .kversion
|
||||
rm -f $(TARGETDIR)/*~ newinclude/linux/*~ *~ .kversion
|
||||
rm -f -r modules
|
||||
|
||||
$(TARGET):
|
||||
$(MAKE) -f Makefile KDIR=$(KDIR) TARGETDIR=$(TARGETDIR) $(TARGET)
|
||||
|
||||
install: $(TARGETS)
|
||||
$(MAKE) -f Makefile KDIR=$(KDIR) TARGETDIR=$(TARGETDIR) install_mod
|
||||
|
||||
install newinclude/linux/hisaxif.h /usr/include/linux
|
||||
|
|
|
@ -5,38 +5,45 @@ KDIR = /usr/src/linux
|
|||
|
||||
DESTDIR =
|
||||
TARGET =
|
||||
TARGETS := Rules.make arch $(TARGET)
|
||||
TARGETS := $(TARGET)
|
||||
TARGETMODDIR = "../misc"
|
||||
|
||||
default: $(TARGETS)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
Rules.make: $(KDIR)/Rules.make
|
||||
cp -pf $(KDIR)/Rules.make .
|
||||
|
||||
arch: $(KDIR)/arch
|
||||
rm -f arch
|
||||
ln -s $(KDIR)/arch .
|
||||
|
||||
MYDIR := `pwd`
|
||||
MYDIR := $(PWD)
|
||||
|
||||
TOPDIR := $(KDIR)
|
||||
include $(KDIR)/.config
|
||||
include $(KDIR)/Makefile
|
||||
TOPDIR := $(KDIR)
|
||||
|
||||
CFLAGS := -I. -I $(MYDIR)/include/linux -I $(KDIR)/drivers/isdn/avmb1 -I $(KDIR)/include $(CFLAGS) -DMODULE -DLINUX
|
||||
CFLAGS := -I. -I $(MYDIR)/newinclude -I $(KDIR)/drivers/isdn/avmb1 $(CFLAGS) -DLINUX
|
||||
|
||||
ifdef CONFIG_MODVERSIONS
|
||||
CFLAGS += -DMODVERSIONS -include $(KDIR)/include/linux/modversions.h
|
||||
CFLAGS += -DMODULE -DMODVERSIONS -include $(MODVERFILE)
|
||||
else
|
||||
CFLAGS += -DMODULE
|
||||
endif
|
||||
|
||||
|
||||
MODLIB := $(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
|
||||
|
||||
newhisax: $(TARGETDIR)
|
||||
$(MAKE) -C $(TARGETDIR) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
|
||||
newhisax: $(TARGETDIR) newhisax_mod
|
||||
$(MAKE) -C $(TARGETDIR) CFLAGS="$(CFLAGS)" MAKING_MODULES=1 modules
|
||||
|
||||
ifeq ($(PATCHLEVEL), 2)
|
||||
install: install_mod
|
||||
|
||||
install_mod: modules_install
|
||||
|
||||
newhisax_mod:
|
||||
echo patchlevel $(PATCHLEVEL)
|
||||
mkdir -p modules
|
||||
|
||||
else
|
||||
newhisax_mod:
|
||||
echo patchlevel $(PATCHLEVEL)
|
||||
|
||||
install: install_mod
|
||||
|
||||
|
@ -46,3 +53,4 @@ install_mod: $(MODLIB)/$(TARGETMODDIR)
|
|||
$(MODLIB)/$(TARGETMODDIR):
|
||||
mkdir -p $(MODLIB)/$(TARGETMODDIR)
|
||||
|
||||
endif
|
||||
|
|
|
@ -55,7 +55,7 @@ obj-$(CONFIG_ISDN_DRV_HISAX) += hisaxl2.o
|
|||
obj-$(CONFIG_ISDN_DRV_HISAX) += l3udss1.o
|
||||
obj-$(CONFIG_ISDN_DRV_HISAX) += hisaxcapi.o
|
||||
|
||||
|
||||
M_OBJS := $(obj-m)
|
||||
|
||||
include $(TOPDIR)/Rules.make
|
||||
|
||||
|
@ -70,32 +70,32 @@ CERT = $(shell md5sum -c md5sums.asc >> /dev/null;echo $$?)
|
|||
|
||||
hisaxcore.o: $(OBJ_core)
|
||||
$(RM) $@
|
||||
$(LD) -r -o $@ $(^:dummy=)
|
||||
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
|
||||
|
||||
fritzpci.o: $(FRITZOBJ)
|
||||
$(RM) $@
|
||||
$(LD) -r -o $@ $(^:dummy=)
|
||||
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
|
||||
|
||||
sedlfax.o: $(SEDLFAXOBJ)
|
||||
$(RM) $@
|
||||
$(LD) -r -o $@ $(^:dummy=)
|
||||
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
|
||||
|
||||
hfcpci.o: $(HFC_PCIOBJ)
|
||||
$(RM) $@
|
||||
$(LD) -r -o $@ $(^:dummy=)
|
||||
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
|
||||
|
||||
hisaxl1.o: $(OBJ_l1)
|
||||
$(RM) $@
|
||||
$(LD) -r -o $@ $(^:dummy=)
|
||||
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
|
||||
|
||||
hisaxl2.o: $(OBJ_l2)
|
||||
$(RM) $@
|
||||
$(LD) -r -o $@ $(^:dummy=)
|
||||
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
|
||||
|
||||
l3udss1.o: $(OBJ_l3udss1)
|
||||
$(RM) $@
|
||||
$(LD) -r -o $@ $(^:dummy=)
|
||||
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
|
||||
|
||||
hisaxcapi.o: $(OBJ_capi)
|
||||
$(RM) $@
|
||||
$(LD) -r -o $@ $(^:dummy=)
|
||||
$(LD) -r -o $@ $(filter-out $(MODVERFILE) dummy ,$^)
|
||||
|
|
|
@ -160,7 +160,7 @@ struct isac_chip {
|
|||
int mon_rxp;
|
||||
struct arcofi_msg *arcofi_list;
|
||||
struct timer_list arcofitimer;
|
||||
struct wait_queue *arcofi_wait;
|
||||
wait_queue_head_t arcofi_wait;
|
||||
u_char arcofi_bc;
|
||||
u_char arcofi_state;
|
||||
u_char mocr;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define set_current_state(sta) (current->state = sta)
|
||||
#define module_init(x) int init_module(void) { return x(); }
|
||||
#define module_exit(x) void cleanup_module(void) { x(); }
|
||||
#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int
|
||||
#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int *)0 = 0; } while (0)
|
||||
#define init_MUTEX(x) *(x)=MUTEX
|
||||
#define init_MUTEX_LOCKED(x) *(x)=MUTEX_LOCKED
|
||||
#define __devinit
|
||||
|
@ -20,9 +20,9 @@
|
|||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
|
||||
|
||||
#define COMPAT_HAS_2_2_PCI
|
||||
#define get_pcibase(ps, nr) ps->base_address[nr]
|
||||
#define pci_resource_start_io(pdev, nr) ((pdev)->base_address[nr] & PCI_BASE_ADDRESS_IO_MASK)
|
||||
#define pci_resource_start_mem(pdev, nr) ((pdev)->base_address[nr] & PCI_BASE_ADDRESS_MEM_MASK)
|
||||
#define get_pcibase(ps,nr) ps->base_address[nr]
|
||||
#define pci_resource_start_io(pdev,nr) pdev->base_address[nr] & PCI_BASE_ADDRESS_IO_MASK
|
||||
#define pci_resource_start_mem(pdev,nr) pdev->base_address[nr] & PCI_BASE_ADDRESS_MEM_MASK
|
||||
#define pci_get_sub_vendor(pdev, id) pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &id)
|
||||
#define pci_get_sub_system(pdev, id) pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &id)
|
||||
|
||||
|
@ -33,8 +33,19 @@
|
|||
#define get_pcibase(ps, nr) ps->resource[nr].start
|
||||
#define pci_get_sub_system(pdev, id) id = pdev->subsystem_device
|
||||
#define pci_get_sub_vendor(pdev, id) id = pdev->subsystem_vendor
|
||||
#define COMPAT_HAS_NEW_WAITQ
|
||||
|
||||
#endif /* 2,4,0 */
|
||||
|
||||
#ifndef COMPAT_HAS_NEW_WAITQ
|
||||
typedef struct wait_queue wait_queue_t;
|
||||
typedef struct wait_queue *wait_queue_head_t;
|
||||
|
||||
#define DECLARE_WAITQUEUE(wait, current) struct wait_queue wait = { current, NULL }
|
||||
#define DECLARE_WAIT_QUEUE_HEAD(wait) wait_queue_head_t wait
|
||||
#define init_waitqueue_head(x) *(x)=NULL
|
||||
#define init_waitqueue_entry(q,p) ((q)->task)=(p)
|
||||
#endif /* COMPAT_HAS_NEW_WAITQ */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_ISDN_COMPAT_H */
|
||||
|
|
Loading…
Reference in New Issue