aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-proc.c')
-rw-r--r--drivers/ide/ide-proc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index afb71c66b6f3..a9e0b30fb1f2 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -310,14 +310,12 @@ static int proc_ide_read_driver
310 ide_driver_t *ide_drv; 310 ide_driver_t *ide_drv;
311 int len; 311 int len;
312 312
313 down_read(&dev->bus->subsys.rwsem);
314 if (dev->driver) { 313 if (dev->driver) {
315 ide_drv = container_of(dev->driver, ide_driver_t, gen_driver); 314 ide_drv = container_of(dev->driver, ide_driver_t, gen_driver);
316 len = sprintf(page, "%s version %s\n", 315 len = sprintf(page, "%s version %s\n",
317 dev->driver->name, ide_drv->version); 316 dev->driver->name, ide_drv->version);
318 } else 317 } else
319 len = sprintf(page, "ide-default version 0.9.newide\n"); 318 len = sprintf(page, "ide-default version 0.9.newide\n");
320 up_read(&dev->bus->subsys.rwsem);
321 PROC_IDE_READ_RETURN(page,start,off,count,eof,len); 319 PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
322} 320}
323 321
@@ -327,7 +325,6 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
327 int ret = 1; 325 int ret = 1;
328 int err; 326 int err;
329 327
330 down_write(&dev->bus->subsys.rwsem);
331 device_release_driver(dev); 328 device_release_driver(dev);
332 /* FIXME: device can still be in use by previous driver */ 329 /* FIXME: device can still be in use by previous driver */
333 strlcpy(drive->driver_req, driver, sizeof(drive->driver_req)); 330 strlcpy(drive->driver_req, driver, sizeof(drive->driver_req));
@@ -345,7 +342,6 @@ static int ide_replace_subdriver(ide_drive_t *drive, const char *driver)
345 } 342 }
346 if (dev->driver && !strcmp(dev->driver->name, driver)) 343 if (dev->driver && !strcmp(dev->driver->name, driver))
347 ret = 0; 344 ret = 0;
348 up_write(&dev->bus->subsys.rwsem);
349 345
350 return ret; 346 return ret;
351} 347}