Commit a2a0f74d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c4011101
...@@ -370,9 +370,7 @@ static ssize_t fw_set_ignore_driver(struct device *dev, struct device_attribute ...@@ -370,9 +370,7 @@ static ssize_t fw_set_ignore_driver(struct device *dev, struct device_attribute
if (state == 1) { if (state == 1) {
ud->ignore_driver = 1; ud->ignore_driver = 1;
down_write(&ieee1394_bus_type.subsys.rwsem);
device_release_driver(dev); device_release_driver(dev);
up_write(&ieee1394_bus_type.subsys.rwsem);
} else if (state == 0) } else if (state == 0)
ud->ignore_driver = 0; ud->ignore_driver = 0;
...@@ -1391,12 +1389,10 @@ static void nodemgr_suspend_ne(struct node_entry *ne) ...@@ -1391,12 +1389,10 @@ static void nodemgr_suspend_ne(struct node_entry *ne)
if (ud->ne != ne) if (ud->ne != ne)
continue; continue;
down_write(&ieee1394_bus_type.subsys.rwsem);
if (ud->device.driver && if (ud->device.driver &&
(!ud->device.driver->suspend || (!ud->device.driver->suspend ||
ud->device.driver->suspend(&ud->device, PMSG_SUSPEND))) ud->device.driver->suspend(&ud->device, PMSG_SUSPEND)))
device_release_driver(&ud->device); device_release_driver(&ud->device);
up_write(&ieee1394_bus_type.subsys.rwsem);
} }
up(&nodemgr_ud_class.sem); up(&nodemgr_ud_class.sem);
} }
...@@ -1416,10 +1412,8 @@ static void nodemgr_resume_ne(struct node_entry *ne) ...@@ -1416,10 +1412,8 @@ static void nodemgr_resume_ne(struct node_entry *ne)
if (ud->ne != ne) if (ud->ne != ne)
continue; continue;
down_read(&ieee1394_bus_type.subsys.rwsem);
if (ud->device.driver && ud->device.driver->resume) if (ud->device.driver && ud->device.driver->resume)
ud->device.driver->resume(&ud->device); ud->device.driver->resume(&ud->device);
up_read(&ieee1394_bus_type.subsys.rwsem);
} }
up(&nodemgr_ud_class.sem); up(&nodemgr_ud_class.sem);
...@@ -1440,7 +1434,6 @@ static void nodemgr_update_pdrv(struct node_entry *ne) ...@@ -1440,7 +1434,6 @@ static void nodemgr_update_pdrv(struct node_entry *ne)
if (ud->ne != ne) if (ud->ne != ne)
continue; continue;
down_write(&ieee1394_bus_type.subsys.rwsem);
if (ud->device.driver) { if (ud->device.driver) {
pdrv = container_of(ud->device.driver, pdrv = container_of(ud->device.driver,
struct hpsb_protocol_driver, struct hpsb_protocol_driver,
...@@ -1448,7 +1441,6 @@ static void nodemgr_update_pdrv(struct node_entry *ne) ...@@ -1448,7 +1441,6 @@ static void nodemgr_update_pdrv(struct node_entry *ne)
if (pdrv->update && pdrv->update(ud)) if (pdrv->update && pdrv->update(ud))
device_release_driver(&ud->device); device_release_driver(&ud->device);
} }
up_write(&ieee1394_bus_type.subsys.rwsem);
} }
up(&nodemgr_ud_class.sem); up(&nodemgr_ud_class.sem);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment