diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-08-15 13:00:09 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-08-15 13:00:09 -0400 |
commit | bb6537a7e989f17c653bd45349105fc3767de53e (patch) | |
tree | 0a062c374a2045d616bf4975488f0a4199cb70ce /linux/drivers/media | |
parent | 8c3cb543d95724a911f77d4c377ad1066557e611 (diff) | |
download | mediapointer-dvb-s2-bb6537a7e989f17c653bd45349105fc3767de53e.tar.gz mediapointer-dvb-s2-bb6537a7e989f17c653bd45349105fc3767de53e.tar.bz2 |
DVB: convert struct class_device to struct device
From: Kay Sievers <kay.sievers@vrfy.org>
The currently used "struct class_device" will be removed from the
kernel. Here is a trivial patch that converts DVB to use struct device.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvbdev.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c index aee6db950..f44ab30de 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.c +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c @@ -211,7 +211,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, { struct dvb_device *dvbdev; struct file_operations *dvbdevfops; - struct class_device *clsdev; + struct device *clsdev; int id; mutex_lock(&dvbdev_register_lock); @@ -253,10 +253,9 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, mutex_unlock(&dvbdev_register_lock); - clsdev = class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, - nums2minor(adap->num, type, id)), - adap->device, "dvb%d.%s%d", adap->num, - dnames[type], id); + clsdev = device_create(dvb_class, adap->device, + MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), + "dvb%d.%s%d", adap->num, dnames[type], id); if (IS_ERR(clsdev)) { printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n", __FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev)); @@ -277,8 +276,8 @@ void dvb_unregister_device(struct dvb_device *dvbdev) if (!dvbdev) return; - class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, - dvbdev->type, dvbdev->id))); + device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, + dvbdev->type, dvbdev->id))); list_del (&dvbdev->list_head); kfree (dvbdev->fops); |