diff options
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 @@ - fix all XXX showstoppers - disable IR/IT DMA interrupts on shutdown - flush pci writes to the card by issuing a read - - devfs and character device dispatching (* needs testing with Linux 2.2.x) + - character device dispatching - switch over to the new kernel DMA API (pci_map_*()) (* needs testing on platforms with IOMMU!) - keep all video_cards in a list (for open() via chardev), set file->private_data = video - dv1394_poll should indicate POLLIN when receiving buffers are available @@ -1096,7 +1096,6 @@ static int do_dv1394_init_default(struct video_card *video) init.api_version = DV1394_API_VERSION; init.n_frames = DV1394_MAX_FRAMES / 4; - /* the following are now set via devfs */ init.channel = video->channel; init.format = video->pal_or_ntsc; init.cip_n = video->cip_n; @@ -1791,8 +1790,6 @@ static int dv1394_open(struct inode *inode, struct file *file) { struct video_card *video = NULL; - /* if the device was opened through devfs, then file->private_data - has already been set to video by devfs */ if (file->private_data) { video = (struct video_card*) file->private_data; @@ -2211,7 +2208,7 @@ static int dv1394_init(struct ti_ohci *ohci, enum pal_or_ntsc format, enum modes video = kzalloc(sizeof(*video), GFP_KERNEL); if (!video) { printk(KERN_ERR "dv1394: cannot allocate video_card\n"); - goto err; + return -1; } video->ohci = ohci; @@ -2266,37 +2263,14 @@ static int dv1394_init(struct ti_ohci *ohci, enum pal_or_ntsc format, enum modes list_add_tail(&video->list, &dv1394_cards); spin_unlock_irqrestore(&dv1394_cards_lock, flags); - if (devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, - IEEE1394_MINOR_BLOCK_DV1394*16 + video->id), - S_IFCHR|S_IRUGO|S_IWUGO, - "ieee1394/dv/host%d/%s/%s", - (video->id>>2), - (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"), - (video->mode == MODE_RECEIVE ? "in" : "out")) < 0) - goto err_free; - debug_printk("dv1394: dv1394_init() OK on ID %d\n", video->id); - return 0; - - err_free: - kfree(video); - err: - return -1; } static void dv1394_un_init(struct video_card *video) { - char buf[32]; - /* obviously nobody has the driver open at this point */ do_dv1394_shutdown(video, 1); - snprintf(buf, sizeof(buf), "dv/host%d/%s/%s", (video->id >> 2), - (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"), - (video->mode == MODE_RECEIVE ? "in" : "out") - ); - - devfs_remove("ieee1394/%s", buf); kfree(video); } @@ -2333,9 +2307,6 @@ static void dv1394_remove_host (struct hpsb_host *host) class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); - devfs_remove("ieee1394/dv/host%d/NTSC", id); - devfs_remove("ieee1394/dv/host%d/PAL", id); - devfs_remove("ieee1394/dv/host%d", id); } static void dv1394_add_host (struct hpsb_host *host) @@ -2352,9 +2323,6 @@ static void dv1394_add_host (struct hpsb_host *host) class_device_create(hpsb_protocol_class, NULL, MKDEV( IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), NULL, "dv1394-%d", id); - devfs_mk_dir("ieee1394/dv/host%d", id); - devfs_mk_dir("ieee1394/dv/host%d/NTSC", id); - devfs_mk_dir("ieee1394/dv/host%d/PAL", id); dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE); dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT); @@ -2611,10 +2579,8 @@ MODULE_LICENSE("GPL"); static void __exit dv1394_exit_module(void) { hpsb_unregister_protocol(&dv1394_driver); - hpsb_unregister_highlevel(&dv1394_highlevel); cdev_del(&dv1394_cdev); - devfs_remove("ieee1394/dv"); } static int __init dv1394_init_module(void) @@ -2630,15 +2596,12 @@ static int __init dv1394_init_module(void) return ret; } - devfs_mk_dir("ieee1394/dv"); - hpsb_register_highlevel(&dv1394_highlevel); ret = hpsb_register_protocol(&dv1394_driver); if (ret) { printk(KERN_ERR "dv1394: failed to register protocol\n"); hpsb_unregister_highlevel(&dv1394_highlevel); - devfs_remove("ieee1394/dv"); cdev_del(&dv1394_cdev); return ret; } 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) goto exit_release_kernel_thread; } - /* actually this is a non-fatal error */ - ret = devfs_mk_dir("ieee1394"); - if (ret < 0) { - HPSB_ERR("unable to make devfs dir for device major %d!\n", IEEE1394_MAJOR); - goto release_chrdev; - } - ret = bus_register(&ieee1394_bus_type); if (ret < 0) { HPSB_INFO("bus register failed"); - goto release_devfs; + goto release_chrdev; } for (i = 0; fw_bus_attrs[i]; i++) { @@ -1099,7 +1092,7 @@ static int __init ieee1394_init(void) fw_bus_attrs[i--]); } bus_unregister(&ieee1394_bus_type); - goto release_devfs; + goto release_chrdev; } } @@ -1152,8 +1145,6 @@ release_all_bus: for (i = 0; fw_bus_attrs[i]; i++) bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); bus_unregister(&ieee1394_bus_type); -release_devfs: - devfs_remove("ieee1394"); release_chrdev: unregister_chrdev_region(IEEE1394_CORE_DEV, 256); exit_release_kernel_thread: @@ -1191,7 +1182,6 @@ static void __exit ieee1394_cleanup(void) hpsb_cleanup_config_roms(); unregister_chrdev_region(IEEE1394_CORE_DEV, 256); - devfs_remove("ieee1394"); } 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 @@ #define _IEEE1394_CORE_H #include <linux/slab.h> -#include <linux/devfs_fs_kernel.h> #include <asm/atomic.h> #include <asm/semaphore.h> #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 @@ #include <linux/cdev.h> #include <asm/uaccess.h> #include <asm/atomic.h> -#include <linux/devfs_fs_kernel.h> #include <linux/compat.h> #include "csr1212.h" @@ -2999,9 +2998,6 @@ static int __init init_raw1394(void) goto out_unreg; } - devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), - S_IFCHR | S_IRUSR | S_IWUSR, RAW1394_DEVICE_NAME); - cdev_init(&raw1394_cdev, &raw1394_fops); raw1394_cdev.owner = THIS_MODULE; kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME); @@ -3023,7 +3019,6 @@ static int __init init_raw1394(void) goto out; out_dev: - devfs_remove(RAW1394_DEVICE_NAME); class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); @@ -3039,7 +3034,6 @@ static void __exit cleanup_raw1394(void) MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); cdev_del(&raw1394_cdev); - devfs_remove(RAW1394_DEVICE_NAME); hpsb_unregister_highlevel(&raw1394_highlevel); hpsb_unregister_protocol(&raw1394_driver); } 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 @@ #include <linux/poll.h> #include <linux/smp_lock.h> #include <linux/delay.h> -#include <linux/devfs_fs_kernel.h> #include <linux/bitops.h> #include <linux/types.h> #include <linux/vmalloc.h> @@ -1322,9 +1321,6 @@ static void video1394_add_host (struct hpsb_host *host) class_device_create(hpsb_protocol_class, NULL, MKDEV( IEEE1394_MAJOR, minor), NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); - devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), - S_IFCHR | S_IRUSR | S_IWUSR, - "%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); } @@ -1332,12 +1328,9 @@ static void video1394_remove_host (struct hpsb_host *host) { struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); - if (ohci) { + if (ohci) class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); - devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); - } - return; } @@ -1478,12 +1471,8 @@ static long video1394_compat_ioctl(struct file *f, unsigned cmd, unsigned long a static void __exit video1394_exit_module (void) { hpsb_unregister_protocol(&video1394_driver); - hpsb_unregister_highlevel(&video1394_highlevel); - - devfs_remove(VIDEO1394_DRIVER_NAME); cdev_del(&video1394_cdev); - PRINT_G(KERN_INFO, "Removed " VIDEO1394_DRIVER_NAME " module"); } @@ -1500,15 +1489,12 @@ static int __init video1394_init_module (void) return ret; } - devfs_mk_dir(VIDEO1394_DRIVER_NAME); - hpsb_register_highlevel(&video1394_highlevel); ret = hpsb_register_protocol(&video1394_driver); if (ret) { PRINT_G(KERN_ERR, "video1394: failed to register protocol"); hpsb_unregister_highlevel(&video1394_highlevel); - devfs_remove(VIDEO1394_DRIVER_NAME); cdev_del(&video1394_cdev); return ret; } |