diff options
author | Kenneth Aafloy <devnull@localhost> | 2004-07-10 23:26:11 +0000 |
---|---|---|
committer | Kenneth Aafloy <devnull@localhost> | 2004-07-10 23:26:11 +0000 |
commit | e8fb0223d74bc481f46c67b67b02428beea9fdeb (patch) | |
tree | 0885046415ec075d8eb0d917bfe07b1f9905f9db /linux | |
parent | 1cae21dd782d79409d619f72c5eecc64b7a13036 (diff) | |
download | mediapointer-dvb-s2-e8fb0223d74bc481f46c67b67b02428beea9fdeb.tar.gz mediapointer-dvb-s2-e8fb0223d74bc481f46c67b67b02428beea9fdeb.tar.bz2 |
Up the driver module usage on i2c client_register, not the frontend module.
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-core.c | 10 |
2 files changed, 9 insertions, 13 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 628a5e5ec..5d9028e9a 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -1409,10 +1409,7 @@ int client_register(struct i2c_client *client) struct saa7146_dev *dev = (struct saa7146_dev*)i2c_get_adapdata(client->adapter); struct av7110 *av7110 = (struct av7110*)dev->ext_priv; - if (!try_module_get(client->driver->owner)) { - printk("Unable to get module lock for '%s'.\n", - client->driver->name); - // XXX - Unregister + if (!try_module_get(THIS_MODULE)) { return -EIO; } @@ -1426,14 +1423,15 @@ int client_unregister(struct i2c_client *client) { struct saa7146_dev *dev = (struct saa7146_dev*)i2c_get_adapdata(client->adapter); struct av7110 *av7110 = (struct av7110*)dev->ext_priv; + int ret = 0; /* fixme: check for "type" (ie. frontend type) */ if (client->driver->command) - return client->driver->command(client, FE_UNREGISTER, av7110->dvb_adapter); + ret = client->driver->command(client, FE_UNREGISTER, av7110->dvb_adapter); - module_put(client->driver->owner); + module_put(THIS_MODULE); - return 0; + return ret; } 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 d1229fd43..c2dc9279e 100644 --- a/linux/drivers/media/dvb/ttpci/budget-core.c +++ b/linux/drivers/media/dvb/ttpci/budget-core.c @@ -271,10 +271,7 @@ 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; - if (!try_module_get(client->driver->owner)) { - printk("Unable to get module lock for '%s'.\n", - client->driver->name); - // XXX - Unregister + if (!try_module_get(THIS_MODULE)) { return -EIO; } @@ -287,11 +284,12 @@ 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; + int ret = 0; if (client->driver->command) - return client->driver->command(client, FE_UNREGISTER, budget->dvb_adapter); + ret = client->driver->command(client, FE_UNREGISTER, budget->dvb_adapter); - module_put(client->driver->owner); + module_put(THIS_MODULE); return 0; } |