diff options
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dmxdev.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_demux.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_i2c.c | 290 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_i2c.h | 80 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_ksyms.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_net.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvbdev.c | 1 |
10 files changed, 3 insertions, 379 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c index 1956bc207..d0965cdff 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.c +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c @@ -34,7 +34,6 @@ #include <asm/system.h> #include "dmxdev.h" -#include "dvb_functions.h" static int debug; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c index 448c0e304..c4d88d4ba 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c @@ -39,7 +39,6 @@ #include <asm/atomic.h> #include "dvb_ca_en50221.h" -#include "dvb_functions.h" #include "dvb_ringbuffer.h" static int dvb_ca_en50221_debug; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c index 93060eb51..8b79bee75 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c @@ -31,7 +31,6 @@ #include <asm/uaccess.h> #include "dvb_demux.h" -#include "dvb_functions.h" #define NOBUFS /* diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c index df58e8725..b92043f34 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -39,7 +39,6 @@ #include "dvb_frontend.h" #include "dvbdev.h" -#include "dvb_functions.h" static int dvb_frontend_debug; static int dvb_shutdown_timeout = 5; @@ -1092,7 +1091,7 @@ static struct file_operations dvb_frontend_fops = { }; int -dvb_register_frontend_new (int (*ioctl) (struct dvb_frontend *frontend, +dvb_register_frontend (int (*ioctl) (struct dvb_frontend *frontend, unsigned int cmd, void *arg), struct dvb_adapter *dvb_adapter, void *data, diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h index 6d44705c1..439dbd5f7 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h @@ -97,7 +97,7 @@ struct dvb_frontend_tune_settings { #define FE_UNREGISTER _IO ('v', 85) extern int -dvb_register_frontend_new (int (*ioctl) (struct dvb_frontend *frontend, +dvb_register_frontend (int (*ioctl) (struct dvb_frontend *frontend, unsigned int cmd, void *arg), struct dvb_adapter *dvb_adapter, void *data, diff --git a/linux/drivers/media/dvb/dvb-core/dvb_i2c.c b/linux/drivers/media/dvb/dvb-core/dvb_i2c.c deleted file mode 100644 index 8bc8b5e7b..000000000 --- a/linux/drivers/media/dvb/dvb-core/dvb_i2c.c +++ /dev/null @@ -1,290 +0,0 @@ -/* - * dvb_i2c.h: simplified i2c interface for DVB adapters to get rid of i2c-core.c - * - * Copyright (C) 2002 Holger Waechtler for convergence integrated media GmbH - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * Or, point your browser to http://www.gnu.org/copyleft/gpl.html - */ - -#include <linux/errno.h> -#include <linux/slab.h> -#include <linux/list.h> -#include <linux/module.h> -#include <asm/semaphore.h> - -#include "dvb_i2c.h" -#include "dvb_functions.h" - - -struct dvb_i2c_device { - struct list_head list_head; - struct module *owner; - int (*attach) (struct dvb_i2c_bus *i2c, void **data); - void (*detach) (struct dvb_i2c_bus *i2c, void *data); - void *data; -}; - -LIST_HEAD(dvb_i2c_buslist); -LIST_HEAD(dvb_i2c_devicelist); - -DECLARE_MUTEX(dvb_i2c_mutex); - -static int register_i2c_client (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev) -{ - struct dvb_i2c_device *client; - - if (!(client = kmalloc (sizeof (struct dvb_i2c_device), GFP_KERNEL))) - return -ENOMEM; - - client->detach = dev->detach; - client->owner = dev->owner; - client->data = dev->data; - - INIT_LIST_HEAD(&client->list_head); - - list_add_tail (&client->list_head, &i2c->client_list); - - return 0; -} - - -static void try_attach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev) -{ - if (dev->owner) { - if (!try_module_get(dev->owner)) - return; - } - - if (dev->attach (i2c, &dev->data) == 0) { - register_i2c_client (i2c, dev); - } else { - if (dev->owner) - module_put (dev->owner); - } -} - - -static void detach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev) -{ - dev->detach (i2c, dev->data); - - if (dev->owner) - module_put (dev->owner); -} - - -static void unregister_i2c_client_from_bus (struct dvb_i2c_device *dev, - struct dvb_i2c_bus *i2c) -{ - struct list_head *entry, *n; - - list_for_each_safe (entry, n, &i2c->client_list) { - struct dvb_i2c_device *client; - - client = list_entry (entry, struct dvb_i2c_device, list_head); - - if (client->detach == dev->detach) { - list_del (entry); - detach_device (i2c, dev); - } - } -} - - -static void unregister_i2c_client_from_all_busses (struct dvb_i2c_device *dev) -{ - struct list_head *entry, *n; - - list_for_each_safe (entry, n, &dvb_i2c_buslist) { - struct dvb_i2c_bus *i2c; - - i2c = list_entry (entry, struct dvb_i2c_bus, list_head); - - unregister_i2c_client_from_bus (dev, i2c); - } -} - - -static void unregister_all_clients_from_bus (struct dvb_i2c_bus *i2c) -{ - struct list_head *entry, *n; - - list_for_each_safe (entry, n, &(i2c->client_list)) { - struct dvb_i2c_device *dev; - - dev = list_entry (entry, struct dvb_i2c_device, list_head); - - unregister_i2c_client_from_bus (dev, i2c); - } -} - - -static void probe_device_on_all_busses (struct dvb_i2c_device *dev) -{ - struct list_head *entry; - - list_for_each (entry, &dvb_i2c_buslist) { - struct dvb_i2c_bus *i2c; - - i2c = list_entry (entry, struct dvb_i2c_bus, list_head); - - try_attach_device (i2c, dev); - } -} - - -static void probe_devices_on_bus (struct dvb_i2c_bus *i2c) -{ - struct list_head *entry; - - list_for_each (entry, &dvb_i2c_devicelist) { - struct dvb_i2c_device *dev; - - dev = list_entry (entry, struct dvb_i2c_device, list_head); - - try_attach_device (i2c, dev); - } -} - - -static struct dvb_i2c_bus* dvb_find_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c, - const struct i2c_msg msgs[], - int num), - struct dvb_adapter *adapter, - int id) -{ - struct list_head *entry; - - list_for_each (entry, &dvb_i2c_buslist) { - struct dvb_i2c_bus *i2c; - - i2c = list_entry (entry, struct dvb_i2c_bus, list_head); - - if (i2c->xfer == xfer && i2c->adapter == adapter && i2c->id == id) - return i2c; - } - - return NULL; -} - - -struct dvb_i2c_bus* -dvb_register_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c, - const struct i2c_msg *msgs, int num), - void *data, struct dvb_adapter *adapter, int id) -{ - struct dvb_i2c_bus *i2c; - - if (down_interruptible (&dvb_i2c_mutex)) - return NULL; - - if (!(i2c = kmalloc (sizeof (struct dvb_i2c_bus), GFP_KERNEL))) { - up (&dvb_i2c_mutex); - return NULL; - } - - INIT_LIST_HEAD(&i2c->list_head); - INIT_LIST_HEAD(&i2c->client_list); - - i2c->xfer = xfer; - i2c->data = data; - i2c->adapter = adapter; - i2c->id = id; - - probe_devices_on_bus (i2c); - - list_add_tail (&i2c->list_head, &dvb_i2c_buslist); - - up (&dvb_i2c_mutex); - - return i2c; -} - - -void dvb_unregister_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c, - const struct i2c_msg msgs[], int num), - struct dvb_adapter *adapter, int id) -{ - struct dvb_i2c_bus *i2c; - - down (&dvb_i2c_mutex); - - if ((i2c = dvb_find_i2c_bus (xfer, adapter, id))) { - unregister_all_clients_from_bus (i2c); - list_del (&i2c->list_head); - kfree (i2c); - } - - up (&dvb_i2c_mutex); -} - - -int dvb_register_i2c_device (struct module *owner, - int (*attach) (struct dvb_i2c_bus *i2c, void **data), - void (*detach) (struct dvb_i2c_bus *i2c, void *data)) -{ - struct dvb_i2c_device *entry; - - if (down_interruptible (&dvb_i2c_mutex)) - return -ERESTARTSYS; - - if (!(entry = kmalloc (sizeof (struct dvb_i2c_device), GFP_KERNEL))) { - up(&dvb_i2c_mutex); - return -ENOMEM; - } - - entry->owner = owner; - entry->attach = attach; - entry->detach = detach; - - INIT_LIST_HEAD(&entry->list_head); - - probe_device_on_all_busses (entry); - - list_add_tail (&entry->list_head, &dvb_i2c_devicelist); - - up (&dvb_i2c_mutex); - - return 0; -} - - -int dvb_unregister_i2c_device (int (*attach) (struct dvb_i2c_bus *i2c, void **data)) -{ - struct list_head *entry, *n; - - down (&dvb_i2c_mutex); - - list_for_each_safe (entry, n, &dvb_i2c_devicelist) { - struct dvb_i2c_device *dev; - - dev = list_entry (entry, struct dvb_i2c_device, list_head); - - if (dev->attach == attach) { - list_del (entry); - unregister_i2c_client_from_all_busses (dev); - kfree (entry); - up (&dvb_i2c_mutex); - return 0; - } - } - - up (&dvb_i2c_mutex); - - return -EINVAL; -} - - diff --git a/linux/drivers/media/dvb/dvb-core/dvb_i2c.h b/linux/drivers/media/dvb/dvb-core/dvb_i2c.h deleted file mode 100644 index 5b37c132a..000000000 --- a/linux/drivers/media/dvb/dvb-core/dvb_i2c.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * dvb_i2c.h: i2c interface to get rid of i2c-core.c - * - * Copyright (C) 2002 Holger Waechtler for convergence integrated media GmbH - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef _DVB_I2C_H_ -#define _DVB_I2C_H_ - -#include <linux/list.h> -#include <linux/i2c.h> - -#include "dvbdev.h" - -//FIXME: Move to i2c-id.h -#define I2C_DRIVERID_DVBFE_ALPS_TDLB7 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_ALPS_TDMB7 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_AT76C651 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_CX24110 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_DST I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_DUMMY I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_L64781 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_MT312 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_MT352 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_NXT6000 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_SP887X I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_STV0299 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_TDA1004X I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_TDA8083 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_VES1820 I2C_DRIVERID_EXP2 -#define I2C_DRIVERID_DVBFE_VES1X93 I2C_DRIVERID_EXP2 - -struct dvb_i2c_bus { - struct list_head list_head; - int (*xfer) (struct dvb_i2c_bus *i2c, - const struct i2c_msg msgs[], - int num); - void *data; - struct dvb_adapter *adapter; - int id; - struct list_head client_list; -}; - - -extern struct dvb_i2c_bus* -dvb_register_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c, - const struct i2c_msg *msgs, int num), - void *data, - struct dvb_adapter *adapter, - int id); - -extern -void dvb_unregister_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c, - const struct i2c_msg msgs[], int num), - struct dvb_adapter *adapter, - int id); - - -extern int dvb_register_i2c_device (struct module *owner, - int (*attach) (struct dvb_i2c_bus *i2c, void **data), - void (*detach) (struct dvb_i2c_bus *i2c, void *data)); - -extern int dvb_unregister_i2c_device (int (*attach) (struct dvb_i2c_bus *i2c, void **data)); - -#endif - diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c b/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c index 57e9ead04..0cf48c77b 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c @@ -23,7 +23,7 @@ EXPORT_SYMBOL(dvb_dmx_swfilter_204); EXPORT_SYMBOL(dvbdmx_connect_frontend); EXPORT_SYMBOL(dvbdmx_disconnect_frontend); -EXPORT_SYMBOL(dvb_register_frontend_new); +EXPORT_SYMBOL(dvb_register_frontend); EXPORT_SYMBOL(dvb_unregister_frontend_new); EXPORT_SYMBOL(dvb_add_frontend_ioctls); EXPORT_SYMBOL(dvb_remove_frontend_ioctls); diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c index 780a02fb6..29bcb929f 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c @@ -40,7 +40,6 @@ #include "dvb_demux.h" #include "dvb_net.h" -#include "dvb_functions.h" static inline __u32 iov_crc32( __u32 c, struct iovec *iov, unsigned int cnt ) diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c index c62bffea9..e7a6ecdab 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.c +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c @@ -33,7 +33,6 @@ #include <linux/device.h> #include "dvbdev.h" -#include "dvb_functions.h" static int dvbdev_debug; |