diff options
author | Michael Hunold <devnull@localhost> | 2003-01-10 22:53:18 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-01-10 22:53:18 +0000 |
commit | fc5c5844077c7478f7d0b67a1a7967f79d9376ba (patch) | |
tree | 3fa2be55940704feeb1dcac8cb8f7f60174870d6 /linux/drivers/media/common | |
parent | 7a3f9d523410405ddeb5a18045135d08a81981a0 (diff) | |
download | mediapointer-dvb-s2-fc5c5844077c7478f7d0b67a1a7967f79d9376ba.tar.gz mediapointer-dvb-s2-fc5c5844077c7478f7d0b67a1a7967f79d9376ba.tar.bz2 |
- Fix broken i2c irq transfer, due to Holger's changes
- clean up the mxb driver and it's helper modules (rename the
structures, add GPL license to the appropriate files, c99
initialisers)
- fix 2.5.55 "module insertion causes bug in kobject.o" issue
- fixed missing exported symbols in budget-core
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r-- | linux/drivers/media/common/saa7146.h | 20 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_core.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_i2c.c | 2 |
3 files changed, 17 insertions, 15 deletions
diff --git a/linux/drivers/media/common/saa7146.h b/linux/drivers/media/common/saa7146.h index d9354a5d2..ece57408c 100644 --- a/linux/drivers/media/common/saa7146.h +++ b/linux/drivers/media/common/saa7146.h @@ -28,15 +28,19 @@ extern unsigned int saa7146_debug; //#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),__stringify(KBUILD_MODNAME),__FUNCTION__) -#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__) -#define DEB_S(x) if (0!=(saa7146_debug&0x01)) { DEBUG_PROLOG; printk x; } /* simple debug messages */ -#define DEB_D(x) if (0!=(saa7146_debug&0x02)) { DEBUG_PROLOG; printk x; } /* more detailed debug messages */ -#define DEB_EE(x) if (0!=(saa7146_debug&0x04)) { DEBUG_PROLOG; printk x; } /* print enter and exit of functions */ -#define DEB_I2C(x) if (0!=(saa7146_debug&0x08)) { DEBUG_PROLOG; printk x; } /* i2c debug messages */ -#define DEB_VBI(x) if (0!=(saa7146_debug&0x10)) { DEBUG_PROLOG; printk x; } /* vbi debug messages */ -#define DEB_INT(x) if (0!=(saa7146_debug&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */ -#define DEB_CAP(x) if (0!=(saa7146_debug&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */ +#ifndef DEBUG_VARIABLE + #define DEBUG_VARIABLE saa7146_debug +#endif + +#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__) +#define DEB_S(x) if (0!=(DEBUG_VARIABLE&0x01)) { DEBUG_PROLOG; printk x; } /* simple debug messages */ +#define DEB_D(x) if (0!=(DEBUG_VARIABLE&0x02)) { DEBUG_PROLOG; printk x; } /* more detailed debug messages */ +#define DEB_EE(x) if (0!=(DEBUG_VARIABLE&0x04)) { DEBUG_PROLOG; printk x; } /* print enter and exit of functions */ +#define DEB_I2C(x) if (0!=(DEBUG_VARIABLE&0x08)) { DEBUG_PROLOG; printk x; } /* i2c debug messages */ +#define DEB_VBI(x) if (0!=(DEBUG_VARIABLE&0x10)) { DEBUG_PROLOG; printk x; } /* vbi debug messages */ +#define DEB_INT(x) if (0!=(DEBUG_VARIABLE&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */ +#define DEB_CAP(x) if (0!=(DEBUG_VARIABLE&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */ #define ERR(x) { DEBUG_PROLOG; printk x; } #define INFO(x) { printk("%s: ",__stringify(KBUILD_MODNAME)); printk x; } diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c index 67f2d3734..247e1c859 100644 --- a/linux/drivers/media/common/saa7146_core.c +++ b/linux/drivers/media/common/saa7146_core.c @@ -27,7 +27,6 @@ struct list_head saa7146_devices; struct semaphore saa7146_devices_lock; -static struct list_head extensions; static int initialized = 0; static int saa7146_num = 0; @@ -394,21 +393,22 @@ int saa7146_register_extension(struct saa7146_extension* ext) if( 0 == initialized ) { INIT_LIST_HEAD(&saa7146_devices); init_MUTEX(&saa7146_devices_lock); - INIT_LIST_HEAD(&extensions); initialized = 1; } - ext->driver.name = "saa7146"; + ext->driver.name = ext->name; ext->driver.id_table = ext->pci_tbl; ext->driver.probe = saa7146_init_one; ext->driver.remove = saa7146_remove_one; - + + printk("saa7146: register extension '%s'.\n",ext->name); return pci_module_init(&ext->driver); } int saa7146_unregister_extension(struct saa7146_extension* ext) { DEB_EE(("ext:%p\n",ext)); + printk("saa7146: unregister extension '%s'.\n",ext->name); pci_unregister_driver(&ext->driver); return 0; } @@ -416,11 +416,9 @@ int saa7146_unregister_extension(struct saa7146_extension* ext) static int saa7146_init_module(void) { - printk("saa7146_init_module()\n"); if( 0 == initialized ) { INIT_LIST_HEAD(&saa7146_devices); init_MUTEX(&saa7146_devices_lock); - INIT_LIST_HEAD(&extensions); initialized = 1; } return 0; diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c index 12d4ad655..adbf61aa6 100644 --- a/linux/drivers/media/common/saa7146_i2c.c +++ b/linux/drivers/media/common/saa7146_i2c.c @@ -299,7 +299,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], i err = saa7146_i2c_writeout(dev, &buffer[i] ); if ( 0 != err) { /* if address-error occured, donīt retry */ - if ( -2 == err ) { + if ( -EREMOTEIO == err ) { goto out; } DEB_I2C(("error while sending message(s). starting again.\n")); |