diff options
author | gregkh@suse.de <gregkh@suse.de> | 2005-03-23 12:53:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:08 -0400 |
commit | ca8eca6884861c1ce294b05aacfdf9045bba9aff (patch) | |
tree | d155207bb52a56683160aa192765a19d67161c01 /drivers/char/ftape/zftape/zftape-init.c | |
parent | deb3697037a7d362d13468a73643e09cbc1615a8 (diff) |
[PATCH] class: convert drivers/char/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/ftape/zftape/zftape-init.c')
-rw-r--r-- | drivers/char/ftape/zftape/zftape-init.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c index dbac7e54e8e0..5745b74044ec 100644 --- a/drivers/char/ftape/zftape/zftape-init.c +++ b/drivers/char/ftape/zftape/zftape-init.c | |||
@@ -99,7 +99,7 @@ static struct file_operations zft_cdev = | |||
99 | .release = zft_close, | 99 | .release = zft_close, |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static struct class_simple *zft_class; | 102 | static struct class *zft_class; |
103 | 103 | ||
104 | /* Open floppy tape device | 104 | /* Open floppy tape device |
105 | */ | 105 | */ |
@@ -329,29 +329,29 @@ KERN_INFO | |||
329 | "installing zftape VFS interface for ftape driver ..."); | 329 | "installing zftape VFS interface for ftape driver ..."); |
330 | TRACE_CATCH(register_chrdev(QIC117_TAPE_MAJOR, "zft", &zft_cdev),); | 330 | TRACE_CATCH(register_chrdev(QIC117_TAPE_MAJOR, "zft", &zft_cdev),); |
331 | 331 | ||
332 | zft_class = class_simple_create(THIS_MODULE, "zft"); | 332 | zft_class = class_create(THIS_MODULE, "zft"); |
333 | for (i = 0; i < 4; i++) { | 333 | for (i = 0; i < 4; i++) { |
334 | class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); | 334 | class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); |
335 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i), | 335 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i), |
336 | S_IFCHR | S_IRUSR | S_IWUSR, | 336 | S_IFCHR | S_IRUSR | S_IWUSR, |
337 | "qft%i", i); | 337 | "qft%i", i); |
338 | class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); | 338 | class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); |
339 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4), | 339 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4), |
340 | S_IFCHR | S_IRUSR | S_IWUSR, | 340 | S_IFCHR | S_IRUSR | S_IWUSR, |
341 | "nqft%i", i); | 341 | "nqft%i", i); |
342 | class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); | 342 | class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); |
343 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16), | 343 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16), |
344 | S_IFCHR | S_IRUSR | S_IWUSR, | 344 | S_IFCHR | S_IRUSR | S_IWUSR, |
345 | "zqft%i", i); | 345 | "zqft%i", i); |
346 | class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); | 346 | class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); |
347 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20), | 347 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20), |
348 | S_IFCHR | S_IRUSR | S_IWUSR, | 348 | S_IFCHR | S_IRUSR | S_IWUSR, |
349 | "nzqft%i", i); | 349 | "nzqft%i", i); |
350 | class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); | 350 | class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); |
351 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32), | 351 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32), |
352 | S_IFCHR | S_IRUSR | S_IWUSR, | 352 | S_IFCHR | S_IRUSR | S_IWUSR, |
353 | "rawqft%i", i); | 353 | "rawqft%i", i); |
354 | class_simple_device_add(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); | 354 | class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); |
355 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36), | 355 | devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36), |
356 | S_IFCHR | S_IRUSR | S_IWUSR, | 356 | S_IFCHR | S_IRUSR | S_IWUSR, |
357 | "nrawqft%i", i); | 357 | "nrawqft%i", i); |
@@ -381,19 +381,19 @@ static void zft_exit(void) | |||
381 | } | 381 | } |
382 | for (i = 0; i < 4; i++) { | 382 | for (i = 0; i < 4; i++) { |
383 | devfs_remove("qft%i", i); | 383 | devfs_remove("qft%i", i); |
384 | class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i)); | 384 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i)); |
385 | devfs_remove("nqft%i", i); | 385 | devfs_remove("nqft%i", i); |
386 | class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 4)); | 386 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4)); |
387 | devfs_remove("zqft%i", i); | 387 | devfs_remove("zqft%i", i); |
388 | class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 16)); | 388 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16)); |
389 | devfs_remove("nzqft%i", i); | 389 | devfs_remove("nzqft%i", i); |
390 | class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 20)); | 390 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20)); |
391 | devfs_remove("rawqft%i", i); | 391 | devfs_remove("rawqft%i", i); |
392 | class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 32)); | 392 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32)); |
393 | devfs_remove("nrawqft%i", i); | 393 | devfs_remove("nrawqft%i", i); |
394 | class_simple_device_remove(MKDEV(QIC117_TAPE_MAJOR, i + 36)); | 394 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36)); |
395 | } | 395 | } |
396 | class_simple_destroy(zft_class); | 396 | class_destroy(zft_class); |
397 | zft_uninit_mem(); /* release remaining memory, if any */ | 397 | zft_uninit_mem(); /* release remaining memory, if any */ |
398 | printk(KERN_INFO "zftape successfully unloaded.\n"); | 398 | printk(KERN_INFO "zftape successfully unloaded.\n"); |
399 | TRACE_EXIT; | 399 | TRACE_EXIT; |