diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-09 11:52:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 13:57:30 -0400 |
commit | c401110186cc0ce2f0e4a03695af115e6c177d95 (patch) | |
tree | 21f96b7e3a26a90b7ce21145856aed917567c5c1 | |
parent | 79580057de60867f535b7e7ec17c85709853d6bf (diff) |
IDE: remove rwsem use from ide-proc core
The subsystem rwsem is not used by the driver core at all, so the use of
it in the ide-proc code of it doesn't make any sense. Perhaps a local
lock might be needed, but I do not really think so.
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux ide <linux-ide@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/ide/ide-proc.c | 4 |
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 | } |