aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-08-15 13:00:09 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:05:11 -0400
commit5f553388b06532b495681f5d6c8e8fbff64ea86a (patch)
tree6022f0295c0aeacfe634df0f06ab3f7b15012cce
parentacb09af4e333dc92cdd32ae75ee7e5f3d7aaf60b (diff)
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: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index 9ef0c00605ee..0f18ce8a9397 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -200,7 +200,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
200{ 200{
201 struct dvb_device *dvbdev; 201 struct dvb_device *dvbdev;
202 struct file_operations *dvbdevfops; 202 struct file_operations *dvbdevfops;
203 struct class_device *clsdev; 203 struct device *clsdev;
204 int id; 204 int id;
205 205
206 mutex_lock(&dvbdev_register_lock); 206 mutex_lock(&dvbdev_register_lock);
@@ -242,10 +242,9 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
242 242
243 mutex_unlock(&dvbdev_register_lock); 243 mutex_unlock(&dvbdev_register_lock);
244 244
245 clsdev = class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, 245 clsdev = device_create(dvb_class, adap->device,
246 nums2minor(adap->num, type, id)), 246 MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
247 adap->device, "dvb%d.%s%d", adap->num, 247 "dvb%d.%s%d", adap->num, dnames[type], id);
248 dnames[type], id);
249 if (IS_ERR(clsdev)) { 248 if (IS_ERR(clsdev)) {
250 printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n", 249 printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
251 __FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev)); 250 __FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev));
@@ -266,8 +265,8 @@ void dvb_unregister_device(struct dvb_device *dvbdev)
266 if (!dvbdev) 265 if (!dvbdev)
267 return; 266 return;
268 267
269 class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, 268 device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num,
270 dvbdev->type, dvbdev->id))); 269 dvbdev->type, dvbdev->id)));
271 270
272 list_del (&dvbdev->list_head); 271 list_del (&dvbdev->list_head);
273 kfree (dvbdev->fops); 272 kfree (dvbdev->fops);