Hi Markus,
this patch makes your Makefiles more kernel like.
Now you can say make; make install; make clean;
Because the two equal tunerchip.h was find in xc5000 and xc3028 I moved
this into a new directory include/.
Please have a look at the EXTRA_CFLAGS in each Makefile. Maybe we can
remove this and add just one in the top level Makefile.
Why do you install the modules manually in build.sh? make install does
the same, but into a different place! If there is no special reason to
do we can remove this also.

Kind Regards,
 Frank 

-- 
Dipl.-Ing. Frank Neuber               http://www.kernelport.org
Kernelport                                    [EMAIL PROTECTED]
Kavelweg 34                         Tel/Fax: +49-33387010-65/66
16321 Bernau bei Berlin OT Schönow    Mobil: +49-163    6683108
diff -ruN em28xx-new.orig/build.sh em28xx-new/build.sh
--- em28xx-new.orig/build.sh	2008-06-06 08:28:00.000000000 +0200
+++ em28xx-new/build.sh	2008-06-06 13:12:16.000000000 +0200
@@ -8,20 +8,15 @@
 fi
 
 if [ "$1" = "build" ]; then
-for i in cx25843 drx3973d lgdt3304 tvp5150 xc3028 xc5000 zl10353 qt1010 mt2060; do
-	cd $i
-	make
-	cd ..
-done
 make
 
 if [ -d /lib/modules/2.6.21.4-eeepc ]; then
-for i in  drx3973d/drx3973d.ko tvp5150/tvp5150.ko lgdt3304/lgdt3304-demod.ko  zl10353/zl10353.ko  cx25843/em28xx-cx25843.ko  xc3028/xc3028-tuner.ko xc5000/xc5000-tuner.ko em28xx.ko em28xx-audio.ko em28xx-dvb.ko precompiled/dvb-core.ko qt1010/qt1010.ko mt2060/mt2060.ko; do 
+for i in  drx3973d/drx3973d.ko tvp5150/tvp5150.ko lgdt3304/lgdt3304-demod.ko  zl10353/zl10353.ko  cx25843/cx25843.ko  xc3028/xc3028-tuner.ko xc5000/xc5000-tuner.ko em28xx.ko em28xx-audio.ko em28xx-dvb.ko precompiled/dvb-core.ko qt1010/qt1010.ko mt2060/mt2060.ko; do 
 	cp $i modules/;
 done
 exit 0
 else
-for i in  drx3973d/drx3973d.ko tvp5150/tvp5150.ko lgdt3304/lgdt3304-demod.ko  zl10353/zl10353.ko  cx25843/em28xx-cx25843.ko  xc3028/xc3028-tuner.ko xc5000/xc5000-tuner.ko em28xx.ko em28xx-audio.ko em28xx-dvb.ko qt1010/qt1010.ko mt2060/mt2060.ko; do 
+for i in  drx3973d/drx3973d.ko tvp5150/tvp5150.ko lgdt3304/lgdt3304-demod.ko  zl10353/zl10353.ko  cx25843/cx25843.ko  xc3028/xc3028-tuner.ko xc5000/xc5000-tuner.ko em28xx.ko em28xx-audio.ko em28xx-dvb.ko qt1010/qt1010.ko mt2060/mt2060.ko; do 
 	cp $i modules/;
 done
 fi
@@ -31,6 +26,7 @@
 
 
 if [ "$1" = "install" ]; then
+	#FIXME Why not just do make install here?
 	find /lib/modules/${KVER}/ | grep tvp5150.ko | xargs rm -rf
 	rm -rf /lib/modules/${KVER}/kernel/drivers/media/video/em28xx
 	rm -rf /lib/modules/${KVER}/empia
@@ -40,11 +36,11 @@
 fi
 
 if [ "$1" = "load" ]; then
-for i in  em28xx-dvb.ko em28xx-audio.ko em28xx.ko drx3973d/drx3973d.ko lgdt3304-demod.ko  zl10353.ko  em28xx-cx25843  xc3028-tuner xc5000-tuner  tvp5150 qt1010 mt2060; do 
+for i in  em28xx-dvb.ko em28xx-audio.ko em28xx.ko drx3973d/drx3973d.ko lgdt3304-demod.ko  zl10353.ko  cx25843  xc3028-tuner xc5000-tuner  tvp5150 qt1010 mt2060; do 
 	rmmod $i;
 done
 
-for i in  mt2060/mt2060.ko qt1010/qt1010.ko drx3973d/drx3973d.ko tvp5150/tvp5150.ko lgdt3304/lgdt3304-demod.ko  zl10353/zl10353.ko  cx25843/em28xx-cx25843.ko  xc3028/xc3028-tuner.ko xc5000/xc5000-tuner.ko em28xx.ko em28xx-audio.ko em28xx-dvb.ko; do 
+for i in  mt2060/mt2060.ko qt1010/qt1010.ko drx3973d/drx3973d.ko tvp5150/tvp5150.ko lgdt3304/lgdt3304-demod.ko  zl10353/zl10353.ko  cx25843/cx25843.ko  xc3028/xc3028-tuner.ko xc5000/xc5000-tuner.ko em28xx.ko em28xx-audio.ko em28xx-dvb.ko; do 
 	insmod $i;
 done
 fi
diff -ruN em28xx-new.orig/cx25843/Makefile em28xx-new/cx25843/Makefile
--- em28xx-new.orig/cx25843/Makefile	2008-06-06 08:28:00.000000000 +0200
+++ em28xx-new/cx25843/Makefile	2008-06-06 12:53:12.000000000 +0200
@@ -1,21 +1,5 @@
-#cx25843-objs   := em28xx-cx25843.o
+cx25843-objs   := em28xx-cx25843.o
+obj-m += cx25843.o
 
-CONFIG_DECODER_EM28XX_CX25843:=m
+EXTRA_CFLAGS += -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_ZL10353
 
-obj-$(CONFIG_DECODER_EM28XX_CX25843) += em28xx-cx25843.o
-
-MDIR := kernel/drivers/media/video/em28xx/cx25843
-
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-
-SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_ZL10353
-
-KDIR    := /lib/modules/$(KVER)/build
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-clean:
-	rm -rf .em28xx-cx25843.ko.cmd em28xx-cx25843.ko em28xx-cx25843.mod.c em28xx-cx25843.mod.o .em28xx-cx25843.mod.o.cmd .em28xx-cx25843.o.cmd Module.symvers .tmp_versions em28xx-cx25843.o
diff -ruN em28xx-new.orig/drx3973d/Makefile em28xx-new/drx3973d/Makefile
--- em28xx-new.orig/drx3973d/Makefile	2008-06-06 08:28:00.000000000 +0200
+++ em28xx-new/drx3973d/Makefile	2008-06-06 12:53:41.000000000 +0200
@@ -2,14 +2,5 @@
 
 obj-m += drx3973d.o
 
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-SDIR    := /lib/modules/$(KVER)/source
-KDIR    := /lib/modules/$(KVER)/build
+EXTRA_CFLAGS += -DCONFIG_DVB_DRX3973D -DDRXD_TYPE_B -DDRXD_TYPE_A
 
-EXTRA_CFLAGS += -DCONFIG_DVB_DRX3973D -DDRXD_TYPE_B -DDRXD_TYPE_A -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core
-
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-clean:
-	rm -rf drx3973d_core.o .drx3973d_core.o.cmd drx3973d_demod.o .drx3973d_demod.o.cmd drx3973d_host.o .drx3973d_host.o.cmd drx3973d_i2c.o .drx3973d_i2c.o.cmd drx3973d.ko .drx3973d.ko.cmd drx3973d.mod.c drx3973d.mod.o .drx3973d.mod.o.cmd drx3973d.o .drx3973d.o.cmd drx_dap_wasi.o .drx_dap_wasi.o.cmd drx_driver.o .drx_driver.o.cmd Module.symvers .tmp_versions
diff -ruN em28xx-new.orig/em28xx-video.c em28xx-new/em28xx-video.c
--- em28xx-new.orig/em28xx-video.c	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/em28xx-video.c	2008-06-06 08:37:51.000000000 +0200
@@ -43,7 +43,7 @@
 #include "em28xx.h"
 #include <media/tuner.h>
 #include <media/v4l2-common.h>
-#include "xc3028/tunerchip.h"
+#include "tunerchip.h"
 #include "xc3028/xc3028_control.h"
 #include "xc3028/xc3028_module.h"
 
diff -ruN em28xx-new.orig/include/tunerchip.h em28xx-new/include/tunerchip.h
--- em28xx-new.orig/include/tunerchip.h	1970-01-01 01:00:00.000000000 +0100
+++ em28xx-new/include/tunerchip.h	2008-06-06 08:28:01.000000000 +0200
@@ -0,0 +1,32 @@
+#ifndef _TUNER_CHIP_H
+#define _TUNER_CHIP_H
+
+struct tuner_module {
+	void *priv;
+        int (*tuner_cmd)(struct tuner_module *client, unsigned int cmd, void *data);
+        int (*shutdown)(struct tuner_module *client);
+        int (*set_frequency)(struct tuner_module *client, unsigned long frequency_in_hz);
+        int (*get_frequency_error)(struct tuner_module *client, long *frequency_error_mhz);
+        int (*get_lock_status)(struct tuner_module *client, unsigned short int *lock_status);
+        int (*get_version)(struct tuner_module *client, unsigned char* hw_majorversion, unsigned char* hw_minorversion, unsigned char* fw_majorversion, unsigned char* fw_minorversion);
+        int (*full_scan)(struct tuner_module *client, unsigned int freq_min, unsigned int freq_max, int freq_list_size, unsigned int *freq_list, int *nb_freq_found );
+	void (*release)(struct tuner_module *client);
+};
+
+#define tuner_chip_detach(MOD) if(MOD) { \
+				MOD->release(MOD); \
+				symbol_put_addr(MOD->release); \
+			       }
+
+#define tuner_chip_attach(FUNCTION, ARGS...) ({ \
+	struct tuner_module *mod = NULL; \
+	typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
+	if (__a) {  \
+		mod=__a(ARGS); \
+		if (mod == 0) \
+			symbol_put(__a); \
+	} \
+	mod; \
+})
+
+#endif
diff -ruN em28xx-new.orig/lgdt3304/Makefile em28xx-new/lgdt3304/Makefile
--- em28xx-new.orig/lgdt3304/Makefile	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/lgdt3304/Makefile	2008-06-06 12:54:15.000000000 +0200
@@ -1,21 +1,6 @@
 lgdt3304-demod-objs   := lgdt3304.o
 
-CONFIG_DEMOD_LGDT3304:=m
+obj-m += lgdt3304-demod.o
 
-obj-$(CONFIG_DEMOD_LGDT3304) += lgdt3304-demod.o
+EXTRA_CFLAGS += -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_ZL10353 -DCONFIG_DVB_LGDT3304
 
-MDIR := kernel/drivers/media/video/em28xx/lgdt3304
-
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-
-SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_ZL10353 -DCONFIG_DVB_LGDT3304
-
-KDIR    := /lib/modules/$(KVER)/build
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-clean:
-	rm -rf lgdt3304-demod.ko .lgdt3304-demod.ko.cmd lgdt3304-demod.mod.c lgdt3304-demod.mod.o .lgdt3304-demod.mod.o.cmd lgdt3304-demod.o .lgdt3304-demod.o.cmd .lgdt3304.o.cmd Module.symvers .tmp_versions lgdt3304.o
diff -ruN em28xx-new.orig/Makefile em28xx-new/Makefile
--- em28xx-new.orig/Makefile	2008-06-06 08:28:00.000000000 +0200
+++ em28xx-new/Makefile	2008-06-06 13:23:00.000000000 +0200
@@ -8,19 +8,41 @@
 CONFIG_VIDEO_EM28XX_AUDIO:=m
 CONFIG_VIDEO_EM28XX:=m
 
-MDIR := kernel/drivers/media/video/em28xx
+CONFIG_DECODER_CX25843:=m
+CONFIG_DECODER_TVP5150:=m
+CONFIG_TUNER_XC3028:=m
+CONFIG_TUNER_XC5000:=m
+CONFIG_TUNER_QT1010:=m
+CONFIG_TUNER_MT2060:=m
+CONFIG_DEMOD_DRX3973D:=m
+CONFIG_DEMOD_LGDT3304:=m
+CONFIG_DEMOD_ZL10353:=m
+
+
 
-obj-$(CONFIG_VIDEO_EM28XX) += em28xx.o
-obj-$(CONFIG_VIDEO_EM28XX_AUDIO) += em28xx-audio.o
-obj-$(CONFIG_DVB_EM2880) += em28xx-dvb.o
+obj-$(CONFIG_VIDEO_EM28XX)		+= em28xx.o
+obj-$(CONFIG_VIDEO_EM28XX_AUDIO)	+= em28xx-audio.o
+obj-$(CONFIG_DVB_EM2880)		+= em28xx-dvb.o
+obj-$(CONFIG_DECODER_CX25843)		+= cx25843/
+obj-$(CONFIG_DEMOD_DRX3973D)		+= drx3973d/
+obj-$(CONFIG_DEMOD_LGDT3304)		+= lgdt3304/
+obj-$(CONFIG_DECODER_TVP5150)		+= tvp5150/
+obj-$(CONFIG_TUNER_XC3028)		+= xc3028/
+obj-$(CONFIG_TUNER_XC5000)		+= xc5000/
+obj-$(CONFIG_DEMOD_ZL10353)		+= zl10353/
+obj-$(CONFIG_TUNER_QT1010)		+= qt1010/
+obj-$(CONFIG_TUNER_MT2060)		+= mt2060/
 
+MDIR := kernel/drivers/media/video/em28xx
 KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
 
 SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
+export SDIR
+
 OLDMOD	:= /lib/modules/$(KVER)/kernel/drivers/media/video/em28xx/em28xx.ko # real modules dir
 
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -Wall -DCONFIG_DVB_ZL10353 -DCONFIG_DVB_DRX3973D -DDRXD_TYPE_B -DDRXD_TYPE_A  -DCONFIG_DVB_LGDT3304 -DCONFIG_MEDIA_TUNER_QT1010 -DCONFIG_DVB_TUNER_MT2060
+EXTRA_CFLAGS += -I$(PWD)/include -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -Wall -DCONFIG_DVB_ZL10353 -DCONFIG_DVB_DRX3973D -DDRXD_TYPE_B -DDRXD_TYPE_A  -DCONFIG_DVB_LGDT3304 -DCONFIG_MEDIA_TUNER_QT1010 -DCONFIG_DVB_TUNER_MT2060
+export EXTRA_CFLAGS
 
 KDIR    := /lib/modules/$(KVER)/build
 
@@ -81,4 +103,7 @@
 commit:
 	hg commit
 clean:
-	rm -rf em2880-dvb.ko em2880-dvb.mod.o em2880-dvb.o em28xx-audio.ko em28xx-audio.mod.o em28xx-audio.o em28xx-cards.o em28xx-core.o em28xx-i2c.o em28xx-input.o em28xx-keymaps.o em28xx.ko em28xx.mod.o em28xx.o em28xx-video.o em28xx-webcam.o .em2880-dvb.ko.cmd .em2880-dvb.mod.o.cmd .em2880-dvb.o.cmd .em28xx-audio.ko.cmd .em28xx-audio.mod.o.cmd .em28xx-audio.o.cmd .em28xx-cards.o.cmd .em28xx-core.o.cmd .em28xx-i2c.o.cmd .em28xx-input.o.cmd .em28xx-keymaps.o.cmd .em28xx.ko.cmd .em28xx.mod.o.cmd .em28xx.o.cmd .em28xx-video.o.cmd .em28xx-webcam.o.cmd .tmp_versions em2880-dvb.mod.c  em28xx-audio.mod.c  em28xx-demods.c  em28xx.mod.c Module.symvers .em28xx-video.o.d  .em28xx-compat.o.cmd .em28xx-dvb.ko.cmd .em28xx-dvb.mod.o.cmd .em28xx-dvb.o.cmd em28xx-compat.o em28xx-dvb.ko em28xx-dvb.mod.c em28xx-dvb.mod.o em28xx-dvb.o .em28xx-video.c.swp .em28xx-radio.o.cmd
+	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
+	@find . -name 'Module.symvers' -exec rm '{}' \;
+	@find . -name '.tmp_versions' -exec rm -rf '{}' \;
+
diff -ruN em28xx-new.orig/mt2060/Makefile em28xx-new/mt2060/Makefile
--- em28xx-new.orig/mt2060/Makefile	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/mt2060/Makefile	2008-06-06 12:58:17.000000000 +0200
@@ -1,19 +1,4 @@
-CONFIG_DVB_TUNER_MT2060:=m
+obj-m += mt2060.o
 
-obj-$(CONFIG_DVB_TUNER_MT2060) += mt2060.o
+EXTRA_CFLAGS += -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_TUNER_MT2060
 
-MDIR := kernel/drivers/media/video/em28xx/mt2060
-
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-
-SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_TUNER_MT2060
-
-KDIR    := /lib/modules/$(KVER)/build
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-clean:
-	 rm -rf Module.symvers .tmp_versions .mt2060.o.cmd .mt2060.mod.o.cmd mt2060.mod.o mt2060.o .mt2060.ko.cmd mt2060.ko mt2060.mod.c
BinÀrdateien em28xx-new.orig/precompiled/dvb-core.ko and em28xx-new/precompiled/dvb-core.ko sind verschieden.
diff -ruN em28xx-new.orig/qt1010/Makefile em28xx-new/qt1010/Makefile
--- em28xx-new.orig/qt1010/Makefile	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/qt1010/Makefile	2008-06-06 12:56:47.000000000 +0200
@@ -1,19 +1,4 @@
-CONFIG_DVB_TUNER_QT1010:=m
+obj-m += qt1010.o
 
-obj-$(CONFIG_DVB_TUNER_QT1010) += qt1010.o
+EXTRA_CFLAGS += -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_MEDIA_TUNER_QT1010
 
-MDIR := kernel/drivers/media/video/em28xx/qt1010
-
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-
-SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_MEDIA_TUNER_QT1010
-
-KDIR    := /lib/modules/$(KVER)/build
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-clean:
-	 rm -rf Module.symvers .tmp_versions zl10353-demod.ko .zl10353-demod.ko.cmd zl10353-demod.mod.c zl10353-demod.mod.o .zl10353-demod.mod.o.cmd zl10353-demod.o .zl10353-demod.o.cmd zl10353.o .zl10353.o.cmd
diff -ruN em28xx-new.orig/tvp5150/Makefile em28xx-new/tvp5150/Makefile
--- em28xx-new.orig/tvp5150/Makefile	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/tvp5150/Makefile	2008-06-06 12:54:51.000000000 +0200
@@ -1,19 +1,4 @@
-CONFIG_TVP5150:=m
+obj-m += tvp5150.o
 
-obj-$(CONFIG_TVP5150) += tvp5150.o
+EXTRA_CFLAGS += -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_ZL10353
 
-MDIR := kernel/drivers/media/video/em28xx/
-
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-
-SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_ZL10353
-
-KDIR    := /lib/modules/$(KVER)/build
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-clean:
-	rm -rf tvp5150-decoder.ko .tvp5150-decoder.ko.cmd tvp5150-decoder.mod.c tvp5150-decoder.mod.o .tvp5150-decoder.mod.o.cmd tvp5150-decoder.o .tvp5150-decoder.o.cmd tvp5150.o .tvp5150.o.cmd .tmp_versions Module.symvers
diff -ruN em28xx-new.orig/xc3028/Makefile em28xx-new/xc3028/Makefile
--- em28xx-new.orig/xc3028/Makefile	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/xc3028/Makefile	2008-06-06 12:55:19.000000000 +0200
@@ -1,23 +1,6 @@
 xc3028-tuner-objs   := xc3028_control.o xc3028_module.o
 
-CONFIG_TUNER_XC3028:=m
+obj-m += xc3028-tuner.o
 
-obj-$(CONFIG_TUNER_XC3028) += xc3028-tuner.o
-
-MDIR := kernel/drivers/media/video/em28xx/xc3028
-
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-
-SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall
-
-KDIR    := /lib/modules/$(KVER)/build
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-
-clean:
-	rm -rf .xc3028.o.cmd  .xc3028.mod.o.cmd xc3028.mod.o xc3028.mod.c .xc3028.ko.cmd .xc3028_control.o.cmd .tuner-xc3028.o.d .tuner-xc3028.o.cmd .tuner-xc3028.mod.o.cmd .tuner-xc3028.ko.cmd tuner-xc3028.mod.c tuner-xc3028.mod.o  .xc3028-tuner.mod.o.cmd .xc3028-tuner.o.cmd .xc3028-tuner.ko.cmd xc3028-tuner.mod.c xc3028-tuner.mod.o  xc3028-tuner.o tuner-xc3028.ko  tuner-xc3028.o  xc3028_control.o  xc3028.o  xc3028-tuner.ko Module.symvers .tmp_versions .xc3028_module.o.cmd xc3028_module.o
+EXTRA_CFLAGS += -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall
 
diff -ruN em28xx-new.orig/xc3028/tunerchip.h em28xx-new/xc3028/tunerchip.h
--- em28xx-new.orig/xc3028/tunerchip.h	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/xc3028/tunerchip.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-#ifndef _TUNER_CHIP_H
-#define _TUNER_CHIP_H
-
-struct tuner_module {
-	void *priv;
-        int (*tuner_cmd)(struct tuner_module *client, unsigned int cmd, void *data);
-        int (*shutdown)(struct tuner_module *client);
-        int (*set_frequency)(struct tuner_module *client, unsigned long frequency_in_hz);
-        int (*get_frequency_error)(struct tuner_module *client, long *frequency_error_mhz);
-        int (*get_lock_status)(struct tuner_module *client, unsigned short int *lock_status);
-        int (*get_version)(struct tuner_module *client, unsigned char* hw_majorversion, unsigned char* hw_minorversion, unsigned char* fw_majorversion, unsigned char* fw_minorversion);
-        int (*full_scan)(struct tuner_module *client, unsigned int freq_min, unsigned int freq_max, int freq_list_size, unsigned int *freq_list, int *nb_freq_found );
-	void (*release)(struct tuner_module *client);
-};
-
-#define tuner_chip_detach(MOD) if(MOD) { \
-				MOD->release(MOD); \
-				symbol_put_addr(MOD->release); \
-			       }
-
-#define tuner_chip_attach(FUNCTION, ARGS...) ({ \
-	struct tuner_module *mod = NULL; \
-	typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
-	if (__a) {  \
-		mod=__a(ARGS); \
-		if (mod == 0) \
-			symbol_put(__a); \
-	} \
-	mod; \
-})
-
-#endif
diff -ruN em28xx-new.orig/xc5000/Makefile em28xx-new/xc5000/Makefile
--- em28xx-new.orig/xc5000/Makefile	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/xc5000/Makefile	2008-06-06 12:55:46.000000000 +0200
@@ -1,23 +1,6 @@
 xc5000-tuner-objs   := xc5000_control.o xc5000_module.o i2c_driver.o
 
-CONFIG_TUNER_XC5000:=m
+obj-m += xc5000-tuner.o
 
-obj-$(CONFIG_TUNER_XC5000) += xc5000-tuner.o
-
-MDIR := kernel/drivers/media/video/em28xx/xc5000
-
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-
-SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall
-
-KDIR    := /lib/modules/$(KVER)/build
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-
-clean:
-	rm -rf .xc5000.o.cmd  .xc5000.mod.o.cmd xc5000.mod.o xc5000.mod.c .xc5000.ko.cmd .xc5000_control.o.cmd .tuner-xc5000.o.d .tuner-xc5000.o.cmd .tuner-xc5000.mod.o.cmd .tuner-xc5000.ko.cmd tuner-xc5000.mod.c tuner-xc5000.mod.o  .xc5000-tuner.mod.o.cmd .xc5000-tuner.o.cmd .xc5000-tuner.ko.cmd xc5000-tuner.mod.c xc5000-tuner.mod.o  xc5000-tuner.o tuner-xc5000.ko  tuner-xc5000.o  xc5000_control.o  xc5000.o  xc5000-tuner.ko Module.symvers .tmp_versions .xc5000_module.o.cmd xc5000_module.o i2c_driver.o .i2c_driver.o.cmd
+EXTRA_CFLAGS += -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall
 
diff -ruN em28xx-new.orig/xc5000/tunerchip.h em28xx-new/xc5000/tunerchip.h
--- em28xx-new.orig/xc5000/tunerchip.h	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/xc5000/tunerchip.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-#ifndef _TUNER_CHIP_H
-#define _TUNER_CHIP_H
-
-struct tuner_module {
-	void *priv;
-        int (*tuner_cmd)(struct tuner_module *client, unsigned int cmd, void *data);
-        int (*shutdown)(struct tuner_module *client);
-        int (*set_frequency)(struct tuner_module *client, unsigned long frequency_in_hz);
-        int (*get_frequency_error)(struct tuner_module *client, long *frequency_error_mhz);
-        int (*get_lock_status)(struct tuner_module *client, unsigned short int *lock_status);
-        int (*get_version)(struct tuner_module *client, unsigned char* hw_majorversion, unsigned char* hw_minorversion, unsigned char* fw_majorversion, unsigned char* fw_minorversion);
-        int (*full_scan)(struct tuner_module *client, unsigned int freq_min, unsigned int freq_max, int freq_list_size, unsigned int *freq_list, int *nb_freq_found );
-	void (*release)(struct tuner_module *client);
-};
-
-#define tuner_chip_detach(MOD) if(MOD) { \
-				MOD->release(MOD); \
-				symbol_put_addr(MOD->release); \
-			       }
-
-#define tuner_chip_attach(FUNCTION, ARGS...) ({ \
-	struct tuner_module *mod = NULL; \
-	typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
-	if (__a) {  \
-		mod=__a(ARGS); \
-		if (mod == 0) \
-			symbol_put(__a); \
-	} \
-	mod; \
-})
-
-#endif
diff -ruN em28xx-new.orig/zl10353/Makefile em28xx-new/zl10353/Makefile
--- em28xx-new.orig/zl10353/Makefile	2008-06-06 08:28:01.000000000 +0200
+++ em28xx-new/zl10353/Makefile	2008-06-06 12:56:20.000000000 +0200
@@ -1,19 +1,4 @@
-CONFIG_DEMOD_ZL10353:=m
+obj-m += zl10353.o
 
-obj-$(CONFIG_DEMOD_ZL10353) += zl10353.o
+EXTRA_CFLAGS += -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_ZL10353
 
-MDIR := kernel/drivers/media/video/em28xx/zl10353
-
-KVER := `if [ -d /lib/modules/2.6.21.4-eeepc ]; then echo 2.6.21.4-eeepc; else uname -r; fi`
-
-SDIR    := /lib/modules/$(KVER)/source
-PWD     := $(shell pwd)
-
-EXTRA_CFLAGS += -I$(SDIR)/drivers/media/video -I$(SDIR)/drivers/media/dvb/frontends -I$(SDIR)/drivers/media/dvb/dvb-core -I$(SDIR)/drivers/media/tuners/ -Iinclude/linux -Idrivers/media/video -Idrivers/media/dvb/frontends -Idrivers/media/dvb/dvb-core -Idrivers/media/tuners/ -Iinclude/linux -DCONFIG_DVB_TUNER_STUB -DCONFIG_DVB_DEMOD_STUB  -Wall -DCONFIG_DVB_ZL10353
-
-KDIR    := /lib/modules/$(KVER)/build
-
-default:
-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
-clean:
-	 rm -rf Module.symvers .tmp_versions zl10353-demod.ko .zl10353-demod.ko.cmd zl10353-demod.mod.c zl10353-demod.mod.o .zl10353-demod.mod.o.cmd zl10353-demod.o .zl10353-demod.o.cmd zl10353.o .zl10353.o.cmd
_______________________________________________
Em28xx mailing list
[email protected]
http://mcentral.de/mailman/listinfo/em28xx

Reply via email to