diff options
author | Johannes Stezenbach <devnull@localhost> | 2004-06-13 16:40:17 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2004-06-13 16:40:17 +0000 |
commit | 7698fbd817af0fab3a1c3fafab143453de0c9bb8 (patch) | |
tree | fa6234e6c39ade66e4c5d6c818b868e7fee93c22 /linux | |
parent | 317d656091ae6e1c0c6d752f64c640c55b07c4d1 (diff) | |
download | mediapointer-dvb-s2-7698fbd817af0fab3a1c3fafab143453de0c9bb8.tar.gz mediapointer-dvb-s2-7698fbd817af0fab3a1c3fafab143453de0c9bb8.tar.bz2 |
fix Oops when the bloody i2c eeprom driver probes the DVB I2C bus
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/b2c2/skystar2.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-core.c | 8 |
3 files changed, 18 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/b2c2/skystar2.c b/linux/drivers/media/dvb/b2c2/skystar2.c index bbb3e4506..d2a2bf350 100644 --- a/linux/drivers/media/dvb/b2c2/skystar2.c +++ b/linux/drivers/media/dvb/b2c2/skystar2.c @@ -2238,7 +2238,9 @@ int client_register(struct i2c_client *client) dprintk("client_register\n"); - return client->driver->command(client, FE_REGISTER, adapter->dvb_adapter); + if (client->driver->command) + return client->driver->command(client, FE_REGISTER, adapter->dvb_adapter); + return 0; } int client_unregister(struct i2c_client *client) @@ -2247,7 +2249,9 @@ int client_unregister(struct i2c_client *client) dprintk("client_unregister\n"); - return client->driver->command(client, FE_UNREGISTER, adapter->dvb_adapter); + if (client->driver->command) + return client->driver->command(client, FE_UNREGISTER, adapter->dvb_adapter); + return 0; } static int flexcop_i2c_xfer(struct i2c_adapter *i2c_adapter, struct i2c_msg msg[], int num) diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 6a872e519..aa9287350 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -1336,7 +1336,9 @@ int client_register(struct i2c_client *client) struct av7110 *av7110 = (struct av7110*)dev->ext_priv; /* fixme: check for "type" (ie. frontend type) */ - return client->driver->command(client, FE_REGISTER, av7110->dvb_adapter); + if (client->driver->command) + return client->driver->command(client, FE_REGISTER, av7110->dvb_adapter); + return 0; } int client_unregister(struct i2c_client *client) @@ -1345,7 +1347,9 @@ int client_unregister(struct i2c_client *client) struct av7110 *av7110 = (struct av7110*)dev->ext_priv; /* fixme: check for "type" (ie. frontend type) */ - return client->driver->command(client, FE_UNREGISTER, av7110->dvb_adapter); + if (client->driver->command) + return client->driver->command(client, FE_UNREGISTER, av7110->dvb_adapter); + return 0; } static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c index 85bb4a9d1..d0dfd9990 100644 --- a/linux/drivers/media/dvb/ttpci/budget-core.c +++ b/linux/drivers/media/dvb/ttpci/budget-core.c @@ -271,7 +271,9 @@ int client_register(struct i2c_client *client) struct saa7146_dev *dev = (struct saa7146_dev*)i2c_get_adapdata(client->adapter); struct budget *budget = (struct budget*)dev->ext_priv; - return client->driver->command(client, FE_REGISTER, budget->dvb_adapter); + if (client->driver->command) + return client->driver->command(client, FE_REGISTER, budget->dvb_adapter); + return 0; } int client_unregister(struct i2c_client *client) @@ -279,7 +281,9 @@ int client_unregister(struct i2c_client *client) struct saa7146_dev *dev = (struct saa7146_dev*)i2c_get_adapdata(client->adapter); struct budget *budget = (struct budget*)dev->ext_priv; - return client->driver->command(client, FE_UNREGISTER, budget->dvb_adapter); + if (client->driver->command) + return client->driver->command(client, FE_UNREGISTER, budget->dvb_adapter); + return 0; } int ttpci_budget_init (struct budget *budget, |