aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-04-09 11:52:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 13:57:30 -0400
commita2a0f74dc1e7d588b0ba6a1d177f42bef18117d0 (patch)
tree2fc4454bf941e2b74c548515e2152093a9299a11 /drivers
parentc401110186cc0ce2f0e4a03695af115e6c177d95 (diff)
IEEE1394: remove rwsem use from ieee1394 core
The subsystem rwsem is not used by the driver core at all, so the use of it in the ieee1394 code doesn't make any sense. They might possibly want to use a local lock, but as most of these operations are already protected by a local lock, it really doesn't look like it would be needed. Cc: Ben Collins <bcollins@debian.org> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: linux1394-devel <linux1394-devel@lists.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/nodemgr.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 1644e6fd2c89..dbeba45a031e 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -370,9 +370,7 @@ static ssize_t fw_set_ignore_driver(struct device *dev, struct device_attribute
370 370
371 if (state == 1) { 371 if (state == 1) {
372 ud->ignore_driver = 1; 372 ud->ignore_driver = 1;
373 down_write(&ieee1394_bus_type.subsys.rwsem);
374 device_release_driver(dev); 373 device_release_driver(dev);
375 up_write(&ieee1394_bus_type.subsys.rwsem);
376 } else if (state == 0) 374 } else if (state == 0)
377 ud->ignore_driver = 0; 375 ud->ignore_driver = 0;
378 376
@@ -1391,12 +1389,10 @@ static void nodemgr_suspend_ne(struct node_entry *ne)
1391 if (ud->ne != ne) 1389 if (ud->ne != ne)
1392 continue; 1390 continue;
1393 1391
1394 down_write(&ieee1394_bus_type.subsys.rwsem);
1395 if (ud->device.driver && 1392 if (ud->device.driver &&
1396 (!ud->device.driver->suspend || 1393 (!ud->device.driver->suspend ||
1397 ud->device.driver->suspend(&ud->device, PMSG_SUSPEND))) 1394 ud->device.driver->suspend(&ud->device, PMSG_SUSPEND)))
1398 device_release_driver(&ud->device); 1395 device_release_driver(&ud->device);
1399 up_write(&ieee1394_bus_type.subsys.rwsem);
1400 } 1396 }
1401 up(&nodemgr_ud_class.sem); 1397 up(&nodemgr_ud_class.sem);
1402} 1398}
@@ -1416,10 +1412,8 @@ static void nodemgr_resume_ne(struct node_entry *ne)
1416 if (ud->ne != ne) 1412 if (ud->ne != ne)
1417 continue; 1413 continue;
1418 1414
1419 down_read(&ieee1394_bus_type.subsys.rwsem);
1420 if (ud->device.driver && ud->device.driver->resume) 1415 if (ud->device.driver && ud->device.driver->resume)
1421 ud->device.driver->resume(&ud->device); 1416 ud->device.driver->resume(&ud->device);
1422 up_read(&ieee1394_bus_type.subsys.rwsem);
1423 } 1417 }
1424 up(&nodemgr_ud_class.sem); 1418 up(&nodemgr_ud_class.sem);
1425 1419
@@ -1440,7 +1434,6 @@ static void nodemgr_update_pdrv(struct node_entry *ne)
1440 if (ud->ne != ne) 1434 if (ud->ne != ne)
1441 continue; 1435 continue;
1442 1436
1443 down_write(&ieee1394_bus_type.subsys.rwsem);
1444 if (ud->device.driver) { 1437 if (ud->device.driver) {
1445 pdrv = container_of(ud->device.driver, 1438 pdrv = container_of(ud->device.driver,
1446 struct hpsb_protocol_driver, 1439 struct hpsb_protocol_driver,
@@ -1448,7 +1441,6 @@ static void nodemgr_update_pdrv(struct node_entry *ne)
1448 if (pdrv->update && pdrv->update(ud)) 1441 if (pdrv->update && pdrv->update(ud))
1449 device_release_driver(&ud->device); 1442 device_release_driver(&ud->device);
1450 } 1443 }
1451 up_write(&ieee1394_bus_type.subsys.rwsem);
1452 } 1444 }
1453 up(&nodemgr_ud_class.sem); 1445 up(&nodemgr_ud_class.sem);
1454} 1446}