diff options
author | Michael Hunold <devnull@localhost> | 2004-08-18 16:01:48 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2004-08-18 16:01:48 +0000 |
commit | 0ec6de1c0fd4aee2037559520db72b6271f2fba3 (patch) | |
tree | af9e89485dbfda0e456e4efafef0e218930fbe57 /linux/drivers/media/dvb/dvb-core | |
parent | a03d5d477ea0fae0a3516f96625431acb0cf31b2 (diff) | |
download | mediapointer-dvb-s2-0ec6de1c0fd4aee2037559520db72b6271f2fba3.tar.gz mediapointer-dvb-s2-0ec6de1c0fd4aee2037559520db72b6271f2fba3.tar.bz2 |
- remove dvb i2c code (all drivers are ported to kernel i2c)
- remove dvb i2c frontend (un)register code (all drivers use non-i2c frontend calls now)
- add i2c driver ids for all frontends to dvb_frontend.h (should be submitted to i2c-id.h)
- fix usage of i2c driver ids in dst, ves1x93, nxt6000 drivers
- remove dvb i2c functionality from av7110 and budget drivers
- remove dvb i2c functionality from Skystar2 driver
- fix up kernel Makefile
- add a FE_ATSC case to avoid compiler warning (print warning message instead)
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/Makefile | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 123 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.h | 33 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_ksyms.c | 8 |
4 files changed, 22 insertions, 144 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/Makefile b/linux/drivers/media/dvb/dvb-core/Makefile index 712778914..b21da2ee6 100644 --- a/linux/drivers/media/dvb/dvb-core/Makefile +++ b/linux/drivers/media/dvb/dvb-core/Makefile @@ -4,6 +4,6 @@ dvb-core-objs = dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \ dvb_ca_en50221.o dvb_functions.o dvb_frontend.o \ - dvb_i2c.o dvb_net.o dvb_ksyms.o dvb_ringbuffer.o + dvb_net.o dvb_ksyms.o dvb_ringbuffer.o obj-$(CONFIG_DVB_CORE) += dvb-core.o diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c index 565ac9117..affc4dfdc 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -788,6 +788,9 @@ static int dvb_frontend_ioctl (struct inode *inode, struct file *file, fe->step_size = fe->info->frequency_stepsize * 2; fe->max_drift = (fe->info->frequency_stepsize * 2) + 1; break; + case FE_ATSC: + printk("dvb-core: FE_ATSC not handled yet.\n"); + break; } } if (dvb_override_tune_delay > 0) { @@ -1086,125 +1089,6 @@ static struct file_operations dvb_frontend_fops = { }; int -dvb_register_frontend (int (*ioctl) (struct dvb_frontend *frontend, - unsigned int cmd, void *arg), - struct dvb_i2c_bus *i2c, - void *data, - struct dvb_frontend_info *info) -{ - struct list_head *entry; - struct dvb_frontend_data *fe; - static const struct dvb_device dvbdev_template = { - .users = ~0, - .writers = 1, - .readers = (~0)-1, - .fops = &dvb_frontend_fops, - .kernel_ioctl = dvb_frontend_ioctl - }; - - dprintk ("%s\n", __FUNCTION__); - - if (down_interruptible (&frontend_mutex)) - return -ERESTARTSYS; - - if (!(fe = kmalloc (sizeof (struct dvb_frontend_data), GFP_KERNEL))) { - up (&frontend_mutex); - return -ENOMEM; - } - - memset (fe, 0, sizeof (struct dvb_frontend_data)); - - init_MUTEX (&fe->sem); - init_waitqueue_head (&fe->wait_queue); - init_waitqueue_head (&fe->events.wait_queue); - init_MUTEX (&fe->events.sem); - fe->events.eventw = fe->events.eventr = 0; - fe->events.overflow = 0; - - fe->frontend.ioctl = ioctl; - fe->frontend.i2c = i2c; - fe->frontend.dvb_adapter = i2c->adapter; - fe->frontend.data = data; - fe->info = info; - fe->inversion = INVERSION_OFF; - - list_for_each (entry, &frontend_ioctl_list) { - struct dvb_frontend_ioctl_data *ioctl; - - ioctl = list_entry (entry, - struct dvb_frontend_ioctl_data, - list_head); - - if (ioctl->adapter == i2c->adapter) { - fe->frontend.before_ioctl = ioctl->before_ioctl; - fe->frontend.after_ioctl = ioctl->after_ioctl; - fe->frontend.before_after_data = ioctl->before_after_data; - break; - } - } - - list_for_each (entry, &frontend_notifier_list) { - struct dvb_frontend_notifier_data *notifier; - - notifier = list_entry (entry, - struct dvb_frontend_notifier_data, - list_head); - - if (notifier->adapter == i2c->adapter) { - fe->frontend.notifier_callback = notifier->callback; - fe->frontend.notifier_data = notifier->data; - break; - } - } - - list_add_tail (&fe->list_head, &frontend_list); - - printk ("DVB: registering frontend %i:%i (%s)...\n", - fe->frontend.i2c->adapter->num, fe->frontend.i2c->id, - fe->info->name); - - dvb_register_device (i2c->adapter, &fe->dvbdev, &dvbdev_template, - fe, DVB_DEVICE_FRONTEND); - - if ((info->caps & FE_NEEDS_BENDING) || (dvb_override_frequency_bending == 2)) - do_frequency_bending = 1; - - up (&frontend_mutex); - - return 0; -} - - -int dvb_unregister_frontend (int (*ioctl) (struct dvb_frontend *frontend, - unsigned int cmd, void *arg), - struct dvb_i2c_bus *i2c) -{ - struct list_head *entry, *n; - - dprintk ("%s\n", __FUNCTION__); - - down (&frontend_mutex); - - list_for_each_safe (entry, n, &frontend_list) { - struct dvb_frontend_data *fe; - - fe = list_entry (entry, struct dvb_frontend_data, list_head); - - if (fe->frontend.ioctl == ioctl && fe->frontend.i2c == i2c) { - dvb_unregister_device (fe->dvbdev); - list_del (entry); - up (&frontend_mutex); - dvb_frontend_stop (fe); - kfree (fe); - return 0; - } - } - - up (&frontend_mutex); - return -EINVAL; -} - -int dvb_register_frontend_new (int (*ioctl) (struct dvb_frontend *frontend, unsigned int cmd, void *arg), struct dvb_adapter *dvb_adapter, @@ -1244,7 +1128,6 @@ dvb_register_frontend_new (int (*ioctl) (struct dvb_frontend *frontend, fe->frontend.ioctl = ioctl; fe->frontend.dvb_adapter = dvb_adapter; - fe->frontend.i2c = NULL; fe->frontend.data = data; fe->info = info; fe->inversion = INVERSION_OFF; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h index d8608d4c3..e23c5f9b2 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h @@ -38,7 +38,24 @@ #include <linux/dvb/frontend.h> #include "dvbdev.h" -#include "dvb_i2c.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 /** * when before_ioctl is registered and returns value 0, ioctl and after_ioctl @@ -54,8 +71,6 @@ struct dvb_frontend { void *before_after_data; /* can be used by hardware module... */ void *notifier_data; /* can be used by hardware module... */ void *data; /* can be used by hardware module... */ - - struct dvb_i2c_bus *i2c; /* legacy cruft, currently fe drivers depend on this */ }; struct dvb_frontend_tune_settings { @@ -81,18 +96,6 @@ struct dvb_frontend_tune_settings { #define FE_UNREGISTER _IO ('v', 85) extern int -dvb_register_frontend (int (*ioctl) (struct dvb_frontend *frontend, - unsigned int cmd, void *arg), - struct dvb_i2c_bus *i2c, - void *data, - struct dvb_frontend_info *info); - -extern int -dvb_unregister_frontend (int (*ioctl) (struct dvb_frontend *frontend, - unsigned int cmd, void *arg), - struct dvb_i2c_bus *i2c); - -extern int dvb_register_frontend_new (int (*ioctl) (struct dvb_frontend *frontend, unsigned int cmd, void *arg), struct dvb_adapter *dvb_adapter, diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c b/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c index c05db66d3..57e9ead04 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c @@ -30,14 +30,6 @@ EXPORT_SYMBOL(dvb_remove_frontend_ioctls); EXPORT_SYMBOL(dvb_add_frontend_notifier); EXPORT_SYMBOL(dvb_remove_frontend_notifier); -#include "dvb_i2c.h" -EXPORT_SYMBOL(dvb_register_i2c_bus); -EXPORT_SYMBOL(dvb_unregister_i2c_bus); -EXPORT_SYMBOL(dvb_register_i2c_device); -EXPORT_SYMBOL(dvb_unregister_i2c_device); -EXPORT_SYMBOL(dvb_register_frontend); -EXPORT_SYMBOL(dvb_unregister_frontend); - EXPORT_SYMBOL(dvb_net_init); EXPORT_SYMBOL(dvb_net_release); |