|
@@ -104,18 +104,6 @@ struct image_desc {
|
|
};
|
|
};
|
|
static struct image_desc image[VME_DEVS];
|
|
static struct image_desc image[VME_DEVS];
|
|
|
|
|
|
-struct driver_stats {
|
|
|
|
- unsigned long reads;
|
|
|
|
- unsigned long writes;
|
|
|
|
- unsigned long ioctls;
|
|
|
|
- unsigned long irqs;
|
|
|
|
- unsigned long berrs;
|
|
|
|
- unsigned long dmaerrors;
|
|
|
|
- unsigned long timeouts;
|
|
|
|
- unsigned long external;
|
|
|
|
-};
|
|
|
|
-static struct driver_stats statistics;
|
|
|
|
-
|
|
|
|
static struct cdev *vme_user_cdev; /* Character device */
|
|
static struct cdev *vme_user_cdev; /* Character device */
|
|
static struct class *vme_user_sysfs_class; /* Sysfs class */
|
|
static struct class *vme_user_sysfs_class; /* Sysfs class */
|
|
static struct vme_dev *vme_user_bridge; /* Pointer to user device */
|
|
static struct vme_dev *vme_user_bridge; /* Pointer to user device */
|
|
@@ -167,20 +155,6 @@ static const struct vm_operations_struct vme_user_vm_ops = {
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
-/*
|
|
|
|
- * Reset all the statistic counters
|
|
|
|
- */
|
|
|
|
-static void reset_counters(void)
|
|
|
|
-{
|
|
|
|
- statistics.reads = 0;
|
|
|
|
- statistics.writes = 0;
|
|
|
|
- statistics.ioctls = 0;
|
|
|
|
- statistics.irqs = 0;
|
|
|
|
- statistics.berrs = 0;
|
|
|
|
- statistics.dmaerrors = 0;
|
|
|
|
- statistics.timeouts = 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int vme_user_open(struct inode *inode, struct file *file)
|
|
static int vme_user_open(struct inode *inode, struct file *file)
|
|
{
|
|
{
|
|
int err;
|
|
int err;
|
|
@@ -465,8 +439,6 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
|
|
dma_addr_t pci_addr;
|
|
dma_addr_t pci_addr;
|
|
void __user *argp = (void __user *)arg;
|
|
void __user *argp = (void __user *)arg;
|
|
|
|
|
|
- statistics.ioctls++;
|
|
|
|
-
|
|
|
|
switch (type[minor]) {
|
|
switch (type[minor]) {
|
|
case CONTROL_MINOR:
|
|
case CONTROL_MINOR:
|
|
switch (cmd) {
|
|
switch (cmd) {
|
|
@@ -765,9 +737,6 @@ static int vme_user_probe(struct vme_dev *vdev)
|
|
image[i].users = 0;
|
|
image[i].users = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- /* Initialise statistics counters */
|
|
|
|
- reset_counters();
|
|
|
|
-
|
|
|
|
/* Assign major and minor numbers for the driver */
|
|
/* Assign major and minor numbers for the driver */
|
|
err = register_chrdev_region(MKDEV(VME_MAJOR, 0), VME_DEVS,
|
|
err = register_chrdev_region(MKDEV(VME_MAJOR, 0), VME_DEVS,
|
|
driver_name);
|
|
driver_name);
|