[linux-dvb] Patch: compiling with -mm
Max Bernöcker
mbernoecker at gmx.de
Sat Apr 23 22:40:53 CEST 2005
Servus,
To get dvb_usb_dtt200u compiled in 2.6.12-rc1-mm3, I had to patch
linux/drivers/media/dvb/dvb-core/dvbdev.c, because
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.12-rc2/2.6.12-rc2-mm3/broken-out/gregkh-driver.patch
deleted linux/drivers/base/class_simple.c. The new functionality is now
in linux/drivers/base/class.c.
Max
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c 2005-03-17 04:12:43.000000000 +0100
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c 2005-04-23 22:09:44.000000000 +0200
@@ -56,7 +56,7 @@
#define nums2minor(num,type,id) ((num << 6) | (id << 4) | type)
#define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64)
-static struct class_simple *dvb_class;
+static struct class *dvb_class;
static struct dvb_device* dvbdev_find_device (int minor)
{
@@ -235,7 +235,7 @@
S_IFCHR | S_IRUSR | S_IWUSR,
"dvb/adapter%d/%s%d", adap->num, dnames[type], id);
- class_simple_device_add(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
+ class_device_create(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
NULL, "dvb%d.%s%d", adap->num, dnames[type], id);
dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n",
@@ -255,7 +255,7 @@
devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num,
dnames[dvbdev->type], dvbdev->id);
- class_simple_device_remove(MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num,
+ class_device_destroy(dvb_class,MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num,
dvbdev->type, dvbdev->id)));
list_del (&dvbdev->list_head);
@@ -411,7 +411,7 @@
devfs_mk_dir("dvb");
- dvb_class = class_simple_create(THIS_MODULE, "dvb");
+ dvb_class = class_create(THIS_MODULE, "dvb");
if (IS_ERR(dvb_class)) {
retval = PTR_ERR(dvb_class);
goto error;
@@ -428,7 +428,7 @@
static void __exit exit_dvbdev(void)
{
devfs_remove("dvb");
- class_simple_destroy(dvb_class);
+ class_destroy(dvb_class);
cdev_del(&dvb_device_cdev);
unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20050423/f9279f06/attachment.pgp
More information about the linux-dvb
mailing list