aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-core/dvbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-core/dvbdev.c')
-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 9d9662f4b8e6..4b7adca3e286 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -56,8 +56,7 @@ static const char * const dnames[] = {
56#define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) 56#define nums2minor(num,type,id) ((num << 6) | (id << 4) | type)
57#define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) 57#define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64)
58 58
59struct class_simple *dvb_class; 59static struct class *dvb_class;
60EXPORT_SYMBOL(dvb_class);
61 60
62static struct dvb_device* dvbdev_find_device (int minor) 61static struct dvb_device* dvbdev_find_device (int minor)
63{ 62{
@@ -236,8 +235,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
236 S_IFCHR | S_IRUSR | S_IWUSR, 235 S_IFCHR | S_IRUSR | S_IWUSR,
237 "dvb/adapter%d/%s%d", adap->num, dnames[type], id); 236 "dvb/adapter%d/%s%d", adap->num, dnames[type], id);
238 237
239 class_simple_device_add(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), 238 class_device_create(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
240 NULL, "dvb%d.%s%d", adap->num, dnames[type], id); 239 NULL, "dvb%d.%s%d", adap->num, dnames[type], id);
241 240
242 dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", 241 dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n",
243 adap->num, dnames[type], id, nums2minor(adap->num, type, id), 242 adap->num, dnames[type], id, nums2minor(adap->num, type, id),
@@ -256,7 +255,7 @@ void dvb_unregister_device(struct dvb_device *dvbdev)
256 devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, 255 devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num,
257 dnames[dvbdev->type], dvbdev->id); 256 dnames[dvbdev->type], dvbdev->id);
258 257
259 class_simple_device_remove(MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, 258 class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num,
260 dvbdev->type, dvbdev->id))); 259 dvbdev->type, dvbdev->id)));
261 260
262 list_del (&dvbdev->list_head); 261 list_del (&dvbdev->list_head);
@@ -412,7 +411,7 @@ static int __init init_dvbdev(void)
412 411
413 devfs_mk_dir("dvb"); 412 devfs_mk_dir("dvb");
414 413
415 dvb_class = class_simple_create(THIS_MODULE, "dvb"); 414 dvb_class = class_create(THIS_MODULE, "dvb");
416 if (IS_ERR(dvb_class)) { 415 if (IS_ERR(dvb_class)) {
417 retval = PTR_ERR(dvb_class); 416 retval = PTR_ERR(dvb_class);
418 goto error; 417 goto error;
@@ -429,7 +428,7 @@ error:
429static void __exit exit_dvbdev(void) 428static void __exit exit_dvbdev(void)
430{ 429{
431 devfs_remove("dvb"); 430 devfs_remove("dvb");
432 class_simple_destroy(dvb_class); 431 class_destroy(dvb_class);
433 cdev_del(&dvb_device_cdev); 432 cdev_del(&dvb_device_cdev);
434 unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); 433 unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
435} 434}