diff options
author | Michael Hunold <devnull@localhost> | 2003-04-22 16:30:45 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-04-22 16:30:45 +0000 |
commit | 5e8fe57d32dd88f0f84ff9c19e57d2e586dba9a7 (patch) | |
tree | 9dfb86fc68b477636df48c5b5ea3af5bfce6193e /linux/drivers/media/common | |
parent | e4b81e505a1aee843073badd3062488776aecfa0 (diff) | |
download | mediapointer-dvb-s2-5e8fe57d32dd88f0f84ff9c19e57d2e586dba9a7.tar.gz mediapointer-dvb-s2-5e8fe57d32dd88f0f84ff9c19e57d2e586dba9a7.tar.bz2 |
- removed the compatibility crap around KBUILD_MODNAME from all drivers,
use KBUILD_BASENAME for 2.4 instead
some changes to the i2c core to make it work with both 2.4 and late 2.5
kernels (not done yet -- only interesting for analog drivers)
- add MODULE_DEVICE_TABLE to all drivers, so that pci "hotplug" can detect
the devices automatically. Alan Cox says, that we should use this to load
the firmware (not done yet)
- fix the long standing "insmod/rmmod with multiple budget cards" bug -- it
was a double kfree() call...
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r-- | linux/drivers/media/common/saa7146_core.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_fops.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_hlp.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_i2c.c | 15 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_vbi.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_video.c | 4 |
6 files changed, 9 insertions, 26 deletions
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c index 385757bab..cad3931a4 100644 --- a/linux/drivers/media/common/saa7146_core.c +++ b/linux/drivers/media/common/saa7146_core.c @@ -20,10 +20,6 @@ #include <media/saa7146.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - /* global variables */ struct list_head saa7146_devices; struct semaphore saa7146_devices_lock; diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c index 31a277fb4..1bda284e4 100644 --- a/linux/drivers/media/common/saa7146_fops.c +++ b/linux/drivers/media/common/saa7146_fops.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - #define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1) /********************************************************************************/ diff --git a/linux/drivers/media/common/saa7146_hlp.c b/linux/drivers/media/common/saa7146_hlp.c index a5f374915..cc7180954 100644 --- a/linux/drivers/media/common/saa7146_hlp.c +++ b/linux/drivers/media/common/saa7146_hlp.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - #define my_min(type,x,y) \ ({ type __x = (x), __y = (y); __x < __y ? __x: __y; }) #define my_max(type,x,y) \ diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c index 33f750799..a1dedcae8 100644 --- a/linux/drivers/media/common/saa7146_i2c.c +++ b/linux/drivers/media/common/saa7146_i2c.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - /* helper function */ static void my_wait(struct saa7146_dev *dev, long ms) @@ -380,9 +376,11 @@ out: static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) { - struct saa7146_dev* dev = (struct saa7146_dev*)adapter->data; - + struct saa7146_dev* dev = i2c_get_adapdata(adapter); + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) DEB_I2C(("adapter: '%s'.\n", adapter->name)); +#endif /* use helper function to transfer data */ return saa7146_i2c_transfer(dev, msg, num, adapter->retries); @@ -412,8 +410,13 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c if( NULL != i2c_adapter ) { memset(i2c_adapter,0,sizeof(struct i2c_adapter)); strcpy(i2c_adapter->name, dev->name); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) i2c_adapter->data = dev; i2c_adapter->algo = &saa7146_algo; +#else + strcpy(i2c_adapter->dev.name, dev->name); + i2c_set_adapdata(i2c_adapter,dev); +#endif i2c_adapter->algo_data = NULL; i2c_adapter->id = I2C_ALGO_SAA7146; i2c_adapter->timeout = SAA7146_I2C_TIMEOUT; diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c index 2b273e4d1..4e3eacb30 100644 --- a/linux/drivers/media/common/saa7146_vbi.c +++ b/linux/drivers/media/common/saa7146_vbi.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - static int vbi_pixel_to_capture = 720 * 2; static diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c index eb090eeeb..7cacfcbdd 100644 --- a/linux/drivers/media/common/saa7146_video.c +++ b/linux/drivers/media/common/saa7146_video.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - static int memory = 32; |