diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-03-28 19:55:41 -0500 |
---|---|---|
committer | Jody McIntyre <scjody@modernduck.com> | 2006-03-28 19:55:41 -0500 |
commit | a8748445e5ff747b114b5c29461ba2d28af404e8 (patch) | |
tree | d3d8a73fc5271664a1ab82a867879f7dbdb85415 /drivers/ieee1394 | |
parent | e2f8165dc3c70cd74bcf2c63a6c0de254c6ff50c (diff) |
ieee1394: remove devfs support
Devfs has been disabled in the last kernel releases, so let's
remove it from ieee1394core, raw1394, video1394, dv1394.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/dv1394.c | 41 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_core.c | 14 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_core.h | 1 | ||||
-rw-r--r-- | drivers/ieee1394/raw1394.c | 6 | ||||
-rw-r--r-- | drivers/ieee1394/video1394.c | 16 |
5 files changed, 5 insertions, 73 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index efeaa944bd0a..85c2d4ca0def 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c | |||
@@ -73,7 +73,7 @@ | |||
73 | - fix all XXX showstoppers | 73 | - fix all XXX showstoppers |
74 | - disable IR/IT DMA interrupts on shutdown | 74 | - disable IR/IT DMA interrupts on shutdown |
75 | - flush pci writes to the card by issuing a read | 75 | - flush pci writes to the card by issuing a read |
76 | - devfs and character device dispatching (* needs testing with Linux 2.2.x) | 76 | - character device dispatching |
77 | - switch over to the new kernel DMA API (pci_map_*()) (* needs testing on platforms with IOMMU!) | 77 | - switch over to the new kernel DMA API (pci_map_*()) (* needs testing on platforms with IOMMU!) |
78 | - keep all video_cards in a list (for open() via chardev), set file->private_data = video | 78 | - keep all video_cards in a list (for open() via chardev), set file->private_data = video |
79 | - dv1394_poll should indicate POLLIN when receiving buffers are available | 79 | - dv1394_poll should indicate POLLIN when receiving buffers are available |
@@ -1096,7 +1096,6 @@ static int do_dv1394_init_default(struct video_card *video) | |||
1096 | 1096 | ||
1097 | init.api_version = DV1394_API_VERSION; | 1097 | init.api_version = DV1394_API_VERSION; |
1098 | init.n_frames = DV1394_MAX_FRAMES / 4; | 1098 | init.n_frames = DV1394_MAX_FRAMES / 4; |
1099 | /* the following are now set via devfs */ | ||
1100 | init.channel = video->channel; | 1099 | init.channel = video->channel; |
1101 | init.format = video->pal_or_ntsc; | 1100 | init.format = video->pal_or_ntsc; |
1102 | init.cip_n = video->cip_n; | 1101 | init.cip_n = video->cip_n; |
@@ -1791,8 +1790,6 @@ static int dv1394_open(struct inode *inode, struct file *file) | |||
1791 | { | 1790 | { |
1792 | struct video_card *video = NULL; | 1791 | struct video_card *video = NULL; |
1793 | 1792 | ||
1794 | /* if the device was opened through devfs, then file->private_data | ||
1795 | has already been set to video by devfs */ | ||
1796 | if (file->private_data) { | 1793 | if (file->private_data) { |
1797 | video = (struct video_card*) file->private_data; | 1794 | video = (struct video_card*) file->private_data; |
1798 | 1795 | ||
@@ -2211,7 +2208,7 @@ static int dv1394_init(struct ti_ohci *ohci, enum pal_or_ntsc format, enum modes | |||
2211 | video = kzalloc(sizeof(*video), GFP_KERNEL); | 2208 | video = kzalloc(sizeof(*video), GFP_KERNEL); |
2212 | if (!video) { | 2209 | if (!video) { |
2213 | printk(KERN_ERR "dv1394: cannot allocate video_card\n"); | 2210 | printk(KERN_ERR "dv1394: cannot allocate video_card\n"); |
2214 | goto err; | 2211 | return -1; |
2215 | } | 2212 | } |
2216 | 2213 | ||
2217 | video->ohci = ohci; | 2214 | video->ohci = ohci; |
@@ -2266,37 +2263,14 @@ static int dv1394_init(struct ti_ohci *ohci, enum pal_or_ntsc format, enum modes | |||
2266 | list_add_tail(&video->list, &dv1394_cards); | 2263 | list_add_tail(&video->list, &dv1394_cards); |
2267 | spin_unlock_irqrestore(&dv1394_cards_lock, flags); | 2264 | spin_unlock_irqrestore(&dv1394_cards_lock, flags); |
2268 | 2265 | ||
2269 | if (devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, | ||
2270 | IEEE1394_MINOR_BLOCK_DV1394*16 + video->id), | ||
2271 | S_IFCHR|S_IRUGO|S_IWUGO, | ||
2272 | "ieee1394/dv/host%d/%s/%s", | ||
2273 | (video->id>>2), | ||
2274 | (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"), | ||
2275 | (video->mode == MODE_RECEIVE ? "in" : "out")) < 0) | ||
2276 | goto err_free; | ||
2277 | |||
2278 | debug_printk("dv1394: dv1394_init() OK on ID %d\n", video->id); | 2266 | debug_printk("dv1394: dv1394_init() OK on ID %d\n", video->id); |
2279 | |||
2280 | return 0; | 2267 | return 0; |
2281 | |||
2282 | err_free: | ||
2283 | kfree(video); | ||
2284 | err: | ||
2285 | return -1; | ||
2286 | } | 2268 | } |
2287 | 2269 | ||
2288 | static void dv1394_un_init(struct video_card *video) | 2270 | static void dv1394_un_init(struct video_card *video) |
2289 | { | 2271 | { |
2290 | char buf[32]; | ||
2291 | |||
2292 | /* obviously nobody has the driver open at this point */ | 2272 | /* obviously nobody has the driver open at this point */ |
2293 | do_dv1394_shutdown(video, 1); | 2273 | do_dv1394_shutdown(video, 1); |
2294 | snprintf(buf, sizeof(buf), "dv/host%d/%s/%s", (video->id >> 2), | ||
2295 | (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"), | ||
2296 | (video->mode == MODE_RECEIVE ? "in" : "out") | ||
2297 | ); | ||
2298 | |||
2299 | devfs_remove("ieee1394/%s", buf); | ||
2300 | kfree(video); | 2274 | kfree(video); |
2301 | } | 2275 | } |
2302 | 2276 | ||
@@ -2333,9 +2307,6 @@ static void dv1394_remove_host (struct hpsb_host *host) | |||
2333 | 2307 | ||
2334 | class_device_destroy(hpsb_protocol_class, | 2308 | class_device_destroy(hpsb_protocol_class, |
2335 | MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); | 2309 | MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); |
2336 | devfs_remove("ieee1394/dv/host%d/NTSC", id); | ||
2337 | devfs_remove("ieee1394/dv/host%d/PAL", id); | ||
2338 | devfs_remove("ieee1394/dv/host%d", id); | ||
2339 | } | 2310 | } |
2340 | 2311 | ||
2341 | static void dv1394_add_host (struct hpsb_host *host) | 2312 | static void dv1394_add_host (struct hpsb_host *host) |
@@ -2352,9 +2323,6 @@ static void dv1394_add_host (struct hpsb_host *host) | |||
2352 | class_device_create(hpsb_protocol_class, NULL, MKDEV( | 2323 | class_device_create(hpsb_protocol_class, NULL, MKDEV( |
2353 | IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), | 2324 | IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), |
2354 | NULL, "dv1394-%d", id); | 2325 | NULL, "dv1394-%d", id); |
2355 | devfs_mk_dir("ieee1394/dv/host%d", id); | ||
2356 | devfs_mk_dir("ieee1394/dv/host%d/NTSC", id); | ||
2357 | devfs_mk_dir("ieee1394/dv/host%d/PAL", id); | ||
2358 | 2326 | ||
2359 | dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE); | 2327 | dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE); |
2360 | dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT); | 2328 | dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT); |
@@ -2611,10 +2579,8 @@ MODULE_LICENSE("GPL"); | |||
2611 | static void __exit dv1394_exit_module(void) | 2579 | static void __exit dv1394_exit_module(void) |
2612 | { | 2580 | { |
2613 | hpsb_unregister_protocol(&dv1394_driver); | 2581 | hpsb_unregister_protocol(&dv1394_driver); |
2614 | |||
2615 | hpsb_unregister_highlevel(&dv1394_highlevel); | 2582 | hpsb_unregister_highlevel(&dv1394_highlevel); |
2616 | cdev_del(&dv1394_cdev); | 2583 | cdev_del(&dv1394_cdev); |
2617 | devfs_remove("ieee1394/dv"); | ||
2618 | } | 2584 | } |
2619 | 2585 | ||
2620 | static int __init dv1394_init_module(void) | 2586 | static int __init dv1394_init_module(void) |
@@ -2630,15 +2596,12 @@ static int __init dv1394_init_module(void) | |||
2630 | return ret; | 2596 | return ret; |
2631 | } | 2597 | } |
2632 | 2598 | ||
2633 | devfs_mk_dir("ieee1394/dv"); | ||
2634 | |||
2635 | hpsb_register_highlevel(&dv1394_highlevel); | 2599 | hpsb_register_highlevel(&dv1394_highlevel); |
2636 | 2600 | ||
2637 | ret = hpsb_register_protocol(&dv1394_driver); | 2601 | ret = hpsb_register_protocol(&dv1394_driver); |
2638 | if (ret) { | 2602 | if (ret) { |
2639 | printk(KERN_ERR "dv1394: failed to register protocol\n"); | 2603 | printk(KERN_ERR "dv1394: failed to register protocol\n"); |
2640 | hpsb_unregister_highlevel(&dv1394_highlevel); | 2604 | hpsb_unregister_highlevel(&dv1394_highlevel); |
2641 | devfs_remove("ieee1394/dv"); | ||
2642 | cdev_del(&dv1394_cdev); | 2605 | cdev_del(&dv1394_cdev); |
2643 | return ret; | 2606 | return ret; |
2644 | } | 2607 | } |
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index 25ef5a86f5f0..c0acaafe82d4 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c | |||
@@ -1078,17 +1078,10 @@ static int __init ieee1394_init(void) | |||
1078 | goto exit_release_kernel_thread; | 1078 | goto exit_release_kernel_thread; |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | /* actually this is a non-fatal error */ | ||
1082 | ret = devfs_mk_dir("ieee1394"); | ||
1083 | if (ret < 0) { | ||
1084 | HPSB_ERR("unable to make devfs dir for device major %d!\n", IEEE1394_MAJOR); | ||
1085 | goto release_chrdev; | ||
1086 | } | ||
1087 | |||
1088 | ret = bus_register(&ieee1394_bus_type); | 1081 | ret = bus_register(&ieee1394_bus_type); |
1089 | if (ret < 0) { | 1082 | if (ret < 0) { |
1090 | HPSB_INFO("bus register failed"); | 1083 | HPSB_INFO("bus register failed"); |
1091 | goto release_devfs; | 1084 | goto release_chrdev; |
1092 | } | 1085 | } |
1093 | 1086 | ||
1094 | for (i = 0; fw_bus_attrs[i]; i++) { | 1087 | for (i = 0; fw_bus_attrs[i]; i++) { |
@@ -1099,7 +1092,7 @@ static int __init ieee1394_init(void) | |||
1099 | fw_bus_attrs[i--]); | 1092 | fw_bus_attrs[i--]); |
1100 | } | 1093 | } |
1101 | bus_unregister(&ieee1394_bus_type); | 1094 | bus_unregister(&ieee1394_bus_type); |
1102 | goto release_devfs; | 1095 | goto release_chrdev; |
1103 | } | 1096 | } |
1104 | } | 1097 | } |
1105 | 1098 | ||
@@ -1152,8 +1145,6 @@ release_all_bus: | |||
1152 | for (i = 0; fw_bus_attrs[i]; i++) | 1145 | for (i = 0; fw_bus_attrs[i]; i++) |
1153 | bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); | 1146 | bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); |
1154 | bus_unregister(&ieee1394_bus_type); | 1147 | bus_unregister(&ieee1394_bus_type); |
1155 | release_devfs: | ||
1156 | devfs_remove("ieee1394"); | ||
1157 | release_chrdev: | 1148 | release_chrdev: |
1158 | unregister_chrdev_region(IEEE1394_CORE_DEV, 256); | 1149 | unregister_chrdev_region(IEEE1394_CORE_DEV, 256); |
1159 | exit_release_kernel_thread: | 1150 | exit_release_kernel_thread: |
@@ -1191,7 +1182,6 @@ static void __exit ieee1394_cleanup(void) | |||
1191 | hpsb_cleanup_config_roms(); | 1182 | hpsb_cleanup_config_roms(); |
1192 | 1183 | ||
1193 | unregister_chrdev_region(IEEE1394_CORE_DEV, 256); | 1184 | unregister_chrdev_region(IEEE1394_CORE_DEV, 256); |
1194 | devfs_remove("ieee1394"); | ||
1195 | } | 1185 | } |
1196 | 1186 | ||
1197 | module_init(ieee1394_init); | 1187 | module_init(ieee1394_init); |
diff --git a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h index b35466023f00..50c69c767b5d 100644 --- a/drivers/ieee1394/ieee1394_core.h +++ b/drivers/ieee1394/ieee1394_core.h | |||
@@ -3,7 +3,6 @@ | |||
3 | #define _IEEE1394_CORE_H | 3 | #define _IEEE1394_CORE_H |
4 | 4 | ||
5 | #include <linux/slab.h> | 5 | #include <linux/slab.h> |
6 | #include <linux/devfs_fs_kernel.h> | ||
7 | #include <asm/atomic.h> | 6 | #include <asm/atomic.h> |
8 | #include <asm/semaphore.h> | 7 | #include <asm/semaphore.h> |
9 | #include "hosts.h" | 8 | #include "hosts.h" |
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 19f26c5c9479..f7de546f2ed6 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/cdev.h> | 41 | #include <linux/cdev.h> |
42 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
43 | #include <asm/atomic.h> | 43 | #include <asm/atomic.h> |
44 | #include <linux/devfs_fs_kernel.h> | ||
45 | #include <linux/compat.h> | 44 | #include <linux/compat.h> |
46 | 45 | ||
47 | #include "csr1212.h" | 46 | #include "csr1212.h" |
@@ -2999,9 +2998,6 @@ static int __init init_raw1394(void) | |||
2999 | goto out_unreg; | 2998 | goto out_unreg; |
3000 | } | 2999 | } |
3001 | 3000 | ||
3002 | devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), | ||
3003 | S_IFCHR | S_IRUSR | S_IWUSR, RAW1394_DEVICE_NAME); | ||
3004 | |||
3005 | cdev_init(&raw1394_cdev, &raw1394_fops); | 3001 | cdev_init(&raw1394_cdev, &raw1394_fops); |
3006 | raw1394_cdev.owner = THIS_MODULE; | 3002 | raw1394_cdev.owner = THIS_MODULE; |
3007 | kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME); | 3003 | kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME); |
@@ -3023,7 +3019,6 @@ static int __init init_raw1394(void) | |||
3023 | goto out; | 3019 | goto out; |
3024 | 3020 | ||
3025 | out_dev: | 3021 | out_dev: |
3026 | devfs_remove(RAW1394_DEVICE_NAME); | ||
3027 | class_device_destroy(hpsb_protocol_class, | 3022 | class_device_destroy(hpsb_protocol_class, |
3028 | MKDEV(IEEE1394_MAJOR, | 3023 | MKDEV(IEEE1394_MAJOR, |
3029 | IEEE1394_MINOR_BLOCK_RAW1394 * 16)); | 3024 | IEEE1394_MINOR_BLOCK_RAW1394 * 16)); |
@@ -3039,7 +3034,6 @@ static void __exit cleanup_raw1394(void) | |||
3039 | MKDEV(IEEE1394_MAJOR, | 3034 | MKDEV(IEEE1394_MAJOR, |
3040 | IEEE1394_MINOR_BLOCK_RAW1394 * 16)); | 3035 | IEEE1394_MINOR_BLOCK_RAW1394 * 16)); |
3041 | cdev_del(&raw1394_cdev); | 3036 | cdev_del(&raw1394_cdev); |
3042 | devfs_remove(RAW1394_DEVICE_NAME); | ||
3043 | hpsb_unregister_highlevel(&raw1394_highlevel); | 3037 | hpsb_unregister_highlevel(&raw1394_highlevel); |
3044 | hpsb_unregister_protocol(&raw1394_driver); | 3038 | hpsb_unregister_protocol(&raw1394_driver); |
3045 | } | 3039 | } |
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index 216dbbf1dc8e..4e3bd62c458d 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <linux/poll.h> | 42 | #include <linux/poll.h> |
43 | #include <linux/smp_lock.h> | 43 | #include <linux/smp_lock.h> |
44 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
45 | #include <linux/devfs_fs_kernel.h> | ||
46 | #include <linux/bitops.h> | 45 | #include <linux/bitops.h> |
47 | #include <linux/types.h> | 46 | #include <linux/types.h> |
48 | #include <linux/vmalloc.h> | 47 | #include <linux/vmalloc.h> |
@@ -1322,9 +1321,6 @@ static void video1394_add_host (struct hpsb_host *host) | |||
1322 | class_device_create(hpsb_protocol_class, NULL, MKDEV( | 1321 | class_device_create(hpsb_protocol_class, NULL, MKDEV( |
1323 | IEEE1394_MAJOR, minor), | 1322 | IEEE1394_MAJOR, minor), |
1324 | NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); | 1323 | NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); |
1325 | devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), | ||
1326 | S_IFCHR | S_IRUSR | S_IWUSR, | ||
1327 | "%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); | ||
1328 | } | 1324 | } |
1329 | 1325 | ||
1330 | 1326 | ||
@@ -1332,12 +1328,9 @@ static void video1394_remove_host (struct hpsb_host *host) | |||
1332 | { | 1328 | { |
1333 | struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); | 1329 | struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); |
1334 | 1330 | ||
1335 | if (ohci) { | 1331 | if (ohci) |
1336 | class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, | 1332 | class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, |
1337 | IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); | 1333 | IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); |
1338 | devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); | ||
1339 | } | ||
1340 | |||
1341 | return; | 1334 | return; |
1342 | } | 1335 | } |
1343 | 1336 | ||
@@ -1478,12 +1471,8 @@ static long video1394_compat_ioctl(struct file *f, unsigned cmd, unsigned long a | |||
1478 | static void __exit video1394_exit_module (void) | 1471 | static void __exit video1394_exit_module (void) |
1479 | { | 1472 | { |
1480 | hpsb_unregister_protocol(&video1394_driver); | 1473 | hpsb_unregister_protocol(&video1394_driver); |
1481 | |||
1482 | hpsb_unregister_highlevel(&video1394_highlevel); | 1474 | hpsb_unregister_highlevel(&video1394_highlevel); |
1483 | |||
1484 | devfs_remove(VIDEO1394_DRIVER_NAME); | ||
1485 | cdev_del(&video1394_cdev); | 1475 | cdev_del(&video1394_cdev); |
1486 | |||
1487 | PRINT_G(KERN_INFO, "Removed " VIDEO1394_DRIVER_NAME " module"); | 1476 | PRINT_G(KERN_INFO, "Removed " VIDEO1394_DRIVER_NAME " module"); |
1488 | } | 1477 | } |
1489 | 1478 | ||
@@ -1500,15 +1489,12 @@ static int __init video1394_init_module (void) | |||
1500 | return ret; | 1489 | return ret; |
1501 | } | 1490 | } |
1502 | 1491 | ||
1503 | devfs_mk_dir(VIDEO1394_DRIVER_NAME); | ||
1504 | |||
1505 | hpsb_register_highlevel(&video1394_highlevel); | 1492 | hpsb_register_highlevel(&video1394_highlevel); |
1506 | 1493 | ||
1507 | ret = hpsb_register_protocol(&video1394_driver); | 1494 | ret = hpsb_register_protocol(&video1394_driver); |
1508 | if (ret) { | 1495 | if (ret) { |
1509 | PRINT_G(KERN_ERR, "video1394: failed to register protocol"); | 1496 | PRINT_G(KERN_ERR, "video1394: failed to register protocol"); |
1510 | hpsb_unregister_highlevel(&video1394_highlevel); | 1497 | hpsb_unregister_highlevel(&video1394_highlevel); |
1511 | devfs_remove(VIDEO1394_DRIVER_NAME); | ||
1512 | cdev_del(&video1394_cdev); | 1498 | cdev_del(&video1394_cdev); |
1513 | return ret; | 1499 | return ret; |
1514 | } | 1500 | } |