[libata] More PATA driver ->cable_detect support
[powerpc.git] / drivers / ide / ide-proc.c
index aa049da..a9e0b30 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <asm/uaccess.h>
 #include <linux/errno.h>
-#include <linux/sched.h>
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
 #include <linux/mm.h>
@@ -311,14 +310,12 @@ static int proc_ide_read_driver
        ide_driver_t    *ide_drv;
        int             len;
 
-       down_read(&dev->bus->subsys.rwsem);
        if (dev->driver) {
                ide_drv = container_of(dev->driver, ide_driver_t, gen_driver);
                len = sprintf(page, "%s version %s\n",
                                dev->driver->name, ide_drv->version);
        } else
                len = sprintf(page, "ide-default version 0.9.newide\n");
-       up_read(&dev->bus->subsys.rwsem);
        PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
 }
 
@@ -328,7 +325,6 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
        int ret = 1;
        int err;
 
-       down_write(&dev->bus->subsys.rwsem);
        device_release_driver(dev);
        /* FIXME: device can still be in use by previous driver */
        strlcpy(drive->driver_req, driver, sizeof(drive->driver_req));
@@ -346,7 +342,6 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
        }
        if (dev->driver && !strcmp(dev->driver->name, driver))
                ret = 0;
-       up_write(&dev->bus->subsys.rwsem);
 
        return ret;
 }
@@ -413,7 +408,6 @@ void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void
        while (p->name != NULL) {
                ent = create_proc_entry(p->name, p->mode, dir);
                if (!ent) return;
-               ent->nlink = 1;
                ent->data = data;
                ent->read_proc = p->read_proc;
                ent->write_proc = p->write_proc;
@@ -549,7 +543,7 @@ static int ide_drivers_open(struct inode *inode, struct file *file)
        return single_open(file, &ide_drivers_show, NULL);
 }
 
-static struct file_operations ide_drivers_operations = {
+static const struct file_operations ide_drivers_operations = {
        .open           = ide_drivers_open,
        .read           = seq_read,
        .llseek         = seq_lseek,