Commit 5f553388 authored by Kay Sievers's avatar Kay Sievers Committed by Mauro Carvalho Chehab

V4L/DVB (6015): DVB: convert struct class_device to struct device

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: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent acb09af4
...@@ -200,7 +200,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, ...@@ -200,7 +200,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
{ {
struct dvb_device *dvbdev; struct dvb_device *dvbdev;
struct file_operations *dvbdevfops; struct file_operations *dvbdevfops;
struct class_device *clsdev; struct device *clsdev;
int id; int id;
mutex_lock(&dvbdev_register_lock); mutex_lock(&dvbdev_register_lock);
...@@ -242,10 +242,9 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, ...@@ -242,10 +242,9 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
mutex_unlock(&dvbdev_register_lock); mutex_unlock(&dvbdev_register_lock);
clsdev = class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, clsdev = device_create(dvb_class, adap->device,
nums2minor(adap->num, type, id)), MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
adap->device, "dvb%d.%s%d", adap->num, "dvb%d.%s%d", adap->num, dnames[type], id);
dnames[type], id);
if (IS_ERR(clsdev)) { if (IS_ERR(clsdev)) {
printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n", printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
__FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev)); __FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev));
...@@ -266,7 +265,7 @@ void dvb_unregister_device(struct dvb_device *dvbdev) ...@@ -266,7 +265,7 @@ void dvb_unregister_device(struct dvb_device *dvbdev)
if (!dvbdev) if (!dvbdev)
return; return;
class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num,
dvbdev->type, dvbdev->id))); dvbdev->type, dvbdev->id)));
list_del (&dvbdev->list_head); list_del (&dvbdev->list_head);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment