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/dv1394.c | |
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/dv1394.c')
-rw-r--r-- | drivers/ieee1394/dv1394.c | 41 |
1 files changed, 2 insertions, 39 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 | } |