Commit 224b148e authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394:
  ohci1394: cleanup the "Unexpected PCI resource length" warning.
  sbp2: misc debug logging cleanups
  sbp2: proper treatment of DID_OK
  ieee1394: set read permission for parameter disable_irm
  sbp2: check for ARM failure
  ohci1394: clean up asynchronous and physical request filters programming
  ieee1394: remove amdtp remains from ieee1394_core.h
  ieee1394: remove devfs support
Signed-off-by: default avatarJody McIntyre <scjody@modernduck.com>
  sbp2: prevent unloading of 1394 low-level driver
parents 54767908 c0e4077c
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
- fix all XXX showstoppers - fix all XXX showstoppers
- disable IR/IT DMA interrupts on shutdown - disable IR/IT DMA interrupts on shutdown
- flush pci writes to the card by issuing a read - 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!) - 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 - 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 - 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,7 +1096,6 @@ static int do_dv1394_init_default(struct video_card *video)
init.api_version = DV1394_API_VERSION; init.api_version = DV1394_API_VERSION;
init.n_frames = DV1394_MAX_FRAMES / 4; init.n_frames = DV1394_MAX_FRAMES / 4;
/* the following are now set via devfs */
init.channel = video->channel; init.channel = video->channel;
init.format = video->pal_or_ntsc; init.format = video->pal_or_ntsc;
init.cip_n = video->cip_n; init.cip_n = video->cip_n;
...@@ -1791,8 +1790,6 @@ static int dv1394_open(struct inode *inode, struct file *file) ...@@ -1791,8 +1790,6 @@ static int dv1394_open(struct inode *inode, struct file *file)
{ {
struct video_card *video = NULL; 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) { if (file->private_data) {
video = (struct video_card*) 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 ...@@ -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); video = kzalloc(sizeof(*video), GFP_KERNEL);
if (!video) { if (!video) {
printk(KERN_ERR "dv1394: cannot allocate video_card\n"); printk(KERN_ERR "dv1394: cannot allocate video_card\n");
goto err; return -1;
} }
video->ohci = ohci; video->ohci = ohci;
...@@ -2266,37 +2263,14 @@ static int dv1394_init(struct ti_ohci *ohci, enum pal_or_ntsc format, enum modes ...@@ -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); list_add_tail(&video->list, &dv1394_cards);
spin_unlock_irqrestore(&dv1394_cards_lock, flags); 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); debug_printk("dv1394: dv1394_init() OK on ID %d\n", video->id);
return 0; return 0;
err_free:
kfree(video);
err:
return -1;
} }
static void dv1394_un_init(struct video_card *video) static void dv1394_un_init(struct video_card *video)
{ {
char buf[32];
/* obviously nobody has the driver open at this point */ /* obviously nobody has the driver open at this point */
do_dv1394_shutdown(video, 1); 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); kfree(video);
} }
...@@ -2333,9 +2307,6 @@ static void dv1394_remove_host (struct hpsb_host *host) ...@@ -2333,9 +2307,6 @@ static void dv1394_remove_host (struct hpsb_host *host)
class_device_destroy(hpsb_protocol_class, class_device_destroy(hpsb_protocol_class,
MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); 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) static void dv1394_add_host (struct hpsb_host *host)
...@@ -2352,9 +2323,6 @@ 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( class_device_create(hpsb_protocol_class, NULL, MKDEV(
IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)),
NULL, "dv1394-%d", id); 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_RECEIVE);
dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT); dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT);
...@@ -2611,10 +2579,8 @@ MODULE_LICENSE("GPL"); ...@@ -2611,10 +2579,8 @@ MODULE_LICENSE("GPL");
static void __exit dv1394_exit_module(void) static void __exit dv1394_exit_module(void)
{ {
hpsb_unregister_protocol(&dv1394_driver); hpsb_unregister_protocol(&dv1394_driver);
hpsb_unregister_highlevel(&dv1394_highlevel); hpsb_unregister_highlevel(&dv1394_highlevel);
cdev_del(&dv1394_cdev); cdev_del(&dv1394_cdev);
devfs_remove("ieee1394/dv");
} }
static int __init dv1394_init_module(void) static int __init dv1394_init_module(void)
...@@ -2630,15 +2596,12 @@ static int __init dv1394_init_module(void) ...@@ -2630,15 +2596,12 @@ static int __init dv1394_init_module(void)
return ret; return ret;
} }
devfs_mk_dir("ieee1394/dv");
hpsb_register_highlevel(&dv1394_highlevel); hpsb_register_highlevel(&dv1394_highlevel);
ret = hpsb_register_protocol(&dv1394_driver); ret = hpsb_register_protocol(&dv1394_driver);
if (ret) { if (ret) {
printk(KERN_ERR "dv1394: failed to register protocol\n"); printk(KERN_ERR "dv1394: failed to register protocol\n");
hpsb_unregister_highlevel(&dv1394_highlevel); hpsb_unregister_highlevel(&dv1394_highlevel);
devfs_remove("ieee1394/dv");
cdev_del(&dv1394_cdev); cdev_del(&dv1394_cdev);
return ret; return ret;
} }
......
...@@ -58,7 +58,7 @@ MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality."); ...@@ -58,7 +58,7 @@ MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality.");
/* Disable Isochronous Resource Manager functionality */ /* Disable Isochronous Resource Manager functionality */
int hpsb_disable_irm = 0; int hpsb_disable_irm = 0;
module_param_named(disable_irm, hpsb_disable_irm, bool, 0); module_param_named(disable_irm, hpsb_disable_irm, bool, 0444);
MODULE_PARM_DESC(disable_irm, MODULE_PARM_DESC(disable_irm,
"Disable Isochronous Resource Manager functionality."); "Disable Isochronous Resource Manager functionality.");
...@@ -1078,17 +1078,10 @@ static int __init ieee1394_init(void) ...@@ -1078,17 +1078,10 @@ static int __init ieee1394_init(void)
goto exit_release_kernel_thread; 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); ret = bus_register(&ieee1394_bus_type);
if (ret < 0) { if (ret < 0) {
HPSB_INFO("bus register failed"); HPSB_INFO("bus register failed");
goto release_devfs; goto release_chrdev;
} }
for (i = 0; fw_bus_attrs[i]; i++) { for (i = 0; fw_bus_attrs[i]; i++) {
...@@ -1099,7 +1092,7 @@ static int __init ieee1394_init(void) ...@@ -1099,7 +1092,7 @@ static int __init ieee1394_init(void)
fw_bus_attrs[i--]); fw_bus_attrs[i--]);
} }
bus_unregister(&ieee1394_bus_type); bus_unregister(&ieee1394_bus_type);
goto release_devfs; goto release_chrdev;
} }
} }
...@@ -1152,8 +1145,6 @@ static int __init ieee1394_init(void) ...@@ -1152,8 +1145,6 @@ static int __init ieee1394_init(void)
for (i = 0; fw_bus_attrs[i]; i++) for (i = 0; fw_bus_attrs[i]; i++)
bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]);
bus_unregister(&ieee1394_bus_type); bus_unregister(&ieee1394_bus_type);
release_devfs:
devfs_remove("ieee1394");
release_chrdev: release_chrdev:
unregister_chrdev_region(IEEE1394_CORE_DEV, 256); unregister_chrdev_region(IEEE1394_CORE_DEV, 256);
exit_release_kernel_thread: exit_release_kernel_thread:
...@@ -1191,7 +1182,6 @@ static void __exit ieee1394_cleanup(void) ...@@ -1191,7 +1182,6 @@ static void __exit ieee1394_cleanup(void)
hpsb_cleanup_config_roms(); hpsb_cleanup_config_roms();
unregister_chrdev_region(IEEE1394_CORE_DEV, 256); unregister_chrdev_region(IEEE1394_CORE_DEV, 256);
devfs_remove("ieee1394");
} }
module_init(ieee1394_init); module_init(ieee1394_init);
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#define _IEEE1394_CORE_H #define _IEEE1394_CORE_H
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/devfs_fs_kernel.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include "hosts.h" #include "hosts.h"
...@@ -202,14 +201,12 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size, ...@@ -202,14 +201,12 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size,
#define IEEE1394_MINOR_BLOCK_RAW1394 0 #define IEEE1394_MINOR_BLOCK_RAW1394 0
#define IEEE1394_MINOR_BLOCK_VIDEO1394 1 #define IEEE1394_MINOR_BLOCK_VIDEO1394 1
#define IEEE1394_MINOR_BLOCK_DV1394 2 #define IEEE1394_MINOR_BLOCK_DV1394 2
#define IEEE1394_MINOR_BLOCK_AMDTP 3
#define IEEE1394_MINOR_BLOCK_EXPERIMENTAL 15 #define IEEE1394_MINOR_BLOCK_EXPERIMENTAL 15
#define IEEE1394_CORE_DEV MKDEV(IEEE1394_MAJOR, 0) #define IEEE1394_CORE_DEV MKDEV(IEEE1394_MAJOR, 0)
#define IEEE1394_RAW1394_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16) #define IEEE1394_RAW1394_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)
#define IEEE1394_VIDEO1394_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_VIDEO1394 * 16) #define IEEE1394_VIDEO1394_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_VIDEO1394 * 16)
#define IEEE1394_DV1394_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16) #define IEEE1394_DV1394_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16)
#define IEEE1394_AMDTP_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_AMDTP * 16)
#define IEEE1394_EXPERIMENTAL_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_EXPERIMENTAL * 16) #define IEEE1394_EXPERIMENTAL_DEV MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_EXPERIMENTAL * 16)
/* return the index (within a minor number block) of a file */ /* return the index (within a minor number block) of a file */
......
...@@ -544,12 +544,19 @@ static void ohci_initialize(struct ti_ohci *ohci) ...@@ -544,12 +544,19 @@ static void ohci_initialize(struct ti_ohci *ohci)
/* Initialize IR Legacy DMA channel mask */ /* Initialize IR Legacy DMA channel mask */
ohci->ir_legacy_channels = 0; ohci->ir_legacy_channels = 0;
/* /* Accept AR requests from all nodes */
* Accept AT requests from all nodes. This probably reg_write(ohci, OHCI1394_AsReqFilterHiSet, 0x80000000);
* will have to be controlled from the subsystem
* on a per node basis. /* Set the address range of the physical response unit.
*/ * Most controllers do not implement it as a writable register though.
reg_write(ohci,OHCI1394_AsReqFilterHiSet, 0x80000000); * They will keep a hardwired offset of 0x00010000 and show 0x0 as
* register content.
* To actually enable physical responses is the job of our interrupt
* handler which programs the physical request filter. */
reg_write(ohci, OHCI1394_PhyUpperBound, 0xffff0000);
DBGMSG("physUpperBoundOffset=%08x",
reg_read(ohci, OHCI1394_PhyUpperBound));
/* Specify AT retries */ /* Specify AT retries */
reg_write(ohci, OHCI1394_ATRetries, reg_write(ohci, OHCI1394_ATRetries,
...@@ -572,6 +579,7 @@ static void ohci_initialize(struct ti_ohci *ohci) ...@@ -572,6 +579,7 @@ static void ohci_initialize(struct ti_ohci *ohci)
OHCI1394_reqTxComplete | OHCI1394_reqTxComplete |
OHCI1394_isochRx | OHCI1394_isochRx |
OHCI1394_isochTx | OHCI1394_isochTx |
OHCI1394_postedWriteErr |
OHCI1394_cycleInconsistent); OHCI1394_cycleInconsistent);
/* Enable link */ /* Enable link */
...@@ -2374,7 +2382,10 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, ...@@ -2374,7 +2382,10 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
event &= ~OHCI1394_unrecoverableError; event &= ~OHCI1394_unrecoverableError;
} }
if (event & OHCI1394_postedWriteErr) {
PRINT(KERN_ERR, "physical posted write error");
/* no recovery strategy yet, had to involve protocol drivers */
}
if (event & OHCI1394_cycleInconsistent) { if (event & OHCI1394_cycleInconsistent) {
/* We subscribe to the cycleInconsistent event only to /* We subscribe to the cycleInconsistent event only to
* clear the corresponding event bit... otherwise, * clear the corresponding event bit... otherwise,
...@@ -2382,7 +2393,6 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, ...@@ -2382,7 +2393,6 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
DBGMSG("OHCI1394_cycleInconsistent"); DBGMSG("OHCI1394_cycleInconsistent");
event &= ~OHCI1394_cycleInconsistent; event &= ~OHCI1394_cycleInconsistent;
} }
if (event & OHCI1394_busReset) { if (event & OHCI1394_busReset) {
/* The busReset event bit can't be cleared during the /* The busReset event bit can't be cleared during the
* selfID phase, so we disable busReset interrupts, to * selfID phase, so we disable busReset interrupts, to
...@@ -2426,7 +2436,6 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, ...@@ -2426,7 +2436,6 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
} }
event &= ~OHCI1394_busReset; event &= ~OHCI1394_busReset;
} }
if (event & OHCI1394_reqTxComplete) { if (event & OHCI1394_reqTxComplete) {
struct dma_trm_ctx *d = &ohci->at_req_context; struct dma_trm_ctx *d = &ohci->at_req_context;
DBGMSG("Got reqTxComplete interrupt " DBGMSG("Got reqTxComplete interrupt "
...@@ -2514,26 +2523,20 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, ...@@ -2514,26 +2523,20 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);
spin_unlock_irqrestore(&ohci->event_lock, flags); spin_unlock_irqrestore(&ohci->event_lock, flags);
/* Accept Physical requests from all nodes. */
reg_write(ohci,OHCI1394_AsReqFilterHiSet, 0xffffffff);
reg_write(ohci,OHCI1394_AsReqFilterLoSet, 0xffffffff);
/* Turn on phys dma reception. /* Turn on phys dma reception.
* *
* TODO: Enable some sort of filtering management. * TODO: Enable some sort of filtering management.
*/ */
if (phys_dma) { if (phys_dma) {
reg_write(ohci,OHCI1394_PhyReqFilterHiSet, 0xffffffff); reg_write(ohci, OHCI1394_PhyReqFilterHiSet,
reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0xffffffff); 0xffffffff);
reg_write(ohci,OHCI1394_PhyUpperBound, 0xffff0000); reg_write(ohci, OHCI1394_PhyReqFilterLoSet,
} else { 0xffffffff);
reg_write(ohci,OHCI1394_PhyReqFilterHiSet, 0x00000000);
reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0x00000000);
} }
DBGMSG("PhyReqFilter=%08x%08x", DBGMSG("PhyReqFilter=%08x%08x",
reg_read(ohci,OHCI1394_PhyReqFilterHiSet), reg_read(ohci, OHCI1394_PhyReqFilterHiSet),
reg_read(ohci,OHCI1394_PhyReqFilterLoSet)); reg_read(ohci, OHCI1394_PhyReqFilterLoSet));
hpsb_selfid_complete(host, phyid, isroot); hpsb_selfid_complete(host, phyid, isroot);
} else } else
...@@ -3259,8 +3262,8 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, ...@@ -3259,8 +3262,8 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
* fail to report the right length. Anyway, the ohci spec * fail to report the right length. Anyway, the ohci spec
* clearly says it's 2kb, so this shouldn't be a problem. */ * clearly says it's 2kb, so this shouldn't be a problem. */
ohci_base = pci_resource_start(dev, 0); ohci_base = pci_resource_start(dev, 0);
if (pci_resource_len(dev, 0) != OHCI1394_REGISTER_SIZE) if (pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE)
PRINT(KERN_WARNING, "Unexpected PCI resource length of %lx!", PRINT(KERN_WARNING, "PCI resource length of %lx too small!",
pci_resource_len(dev, 0)); pci_resource_len(dev, 0));
/* Seems PCMCIA handles this internally. Not sure why. Seems /* Seems PCMCIA handles this internally. Not sure why. Seems
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <linux/cdev.h> #include <linux/cdev.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/compat.h> #include <linux/compat.h>
#include "csr1212.h" #include "csr1212.h"
...@@ -2999,9 +2998,6 @@ static int __init init_raw1394(void) ...@@ -2999,9 +2998,6 @@ static int __init init_raw1394(void)
goto out_unreg; 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); cdev_init(&raw1394_cdev, &raw1394_fops);
raw1394_cdev.owner = THIS_MODULE; raw1394_cdev.owner = THIS_MODULE;
kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME); kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME);
...@@ -3023,7 +3019,6 @@ static int __init init_raw1394(void) ...@@ -3023,7 +3019,6 @@ static int __init init_raw1394(void)
goto out; goto out;
out_dev: out_dev:
devfs_remove(RAW1394_DEVICE_NAME);
class_device_destroy(hpsb_protocol_class, class_device_destroy(hpsb_protocol_class,
MKDEV(IEEE1394_MAJOR, MKDEV(IEEE1394_MAJOR,
IEEE1394_MINOR_BLOCK_RAW1394 * 16)); IEEE1394_MINOR_BLOCK_RAW1394 * 16));
...@@ -3039,7 +3034,6 @@ static void __exit cleanup_raw1394(void) ...@@ -3039,7 +3034,6 @@ static void __exit cleanup_raw1394(void)
MKDEV(IEEE1394_MAJOR, MKDEV(IEEE1394_MAJOR,
IEEE1394_MINOR_BLOCK_RAW1394 * 16)); IEEE1394_MINOR_BLOCK_RAW1394 * 16));
cdev_del(&raw1394_cdev); cdev_del(&raw1394_cdev);
devfs_remove(RAW1394_DEVICE_NAME);
hpsb_unregister_highlevel(&raw1394_highlevel); hpsb_unregister_highlevel(&raw1394_highlevel);
hpsb_unregister_protocol(&raw1394_driver); hpsb_unregister_protocol(&raw1394_driver);
} }
......
This diff is collapsed.
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
...@@ -1322,9 +1321,6 @@ static void video1394_add_host (struct hpsb_host *host) ...@@ -1322,9 +1321,6 @@ static void video1394_add_host (struct hpsb_host *host)
class_device_create(hpsb_protocol_class, NULL, MKDEV( class_device_create(hpsb_protocol_class, NULL, MKDEV(
IEEE1394_MAJOR, minor), IEEE1394_MAJOR, minor),
NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); 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) ...@@ -1332,12 +1328,9 @@ static void video1394_remove_host (struct hpsb_host *host)
{ {
struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host);
if (ohci) { if (ohci)
class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR,
IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id));
devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
}
return; return;
} }
...@@ -1478,12 +1471,8 @@ static long video1394_compat_ioctl(struct file *f, unsigned cmd, unsigned long a ...@@ -1478,12 +1471,8 @@ static long video1394_compat_ioctl(struct file *f, unsigned cmd, unsigned long a
static void __exit video1394_exit_module (void) static void __exit video1394_exit_module (void)
{ {
hpsb_unregister_protocol(&video1394_driver); hpsb_unregister_protocol(&video1394_driver);
hpsb_unregister_highlevel(&video1394_highlevel); hpsb_unregister_highlevel(&video1394_highlevel);
devfs_remove(VIDEO1394_DRIVER_NAME);
cdev_del(&video1394_cdev); cdev_del(&video1394_cdev);
PRINT_G(KERN_INFO, "Removed " VIDEO1394_DRIVER_NAME " module"); PRINT_G(KERN_INFO, "Removed " VIDEO1394_DRIVER_NAME " module");
} }
...@@ -1500,15 +1489,12 @@ static int __init video1394_init_module (void) ...@@ -1500,15 +1489,12 @@ static int __init video1394_init_module (void)
return ret; return ret;
} }
devfs_mk_dir(VIDEO1394_DRIVER_NAME);
hpsb_register_highlevel(&video1394_highlevel); hpsb_register_highlevel(&video1394_highlevel);
ret = hpsb_register_protocol(&video1394_driver); ret = hpsb_register_protocol(&video1394_driver);
if (ret) { if (ret) {
PRINT_G(KERN_ERR, "video1394: failed to register protocol"); PRINT_G(KERN_ERR, "video1394: failed to register protocol");
hpsb_unregister_highlevel(&video1394_highlevel); hpsb_unregister_highlevel(&video1394_highlevel);
devfs_remove(VIDEO1394_DRIVER_NAME);
cdev_del(&video1394_cdev); cdev_del(&video1394_cdev);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment