if (state == 1) {
ud->ignore_driver = 1;
- down_write(&ieee1394_bus_type.subsys.rwsem);
device_release_driver(dev);
- up_write(&ieee1394_bus_type.subsys.rwsem);
} else if (state == 0)
ud->ignore_driver = 0;
if (ud->ne != ne)
continue;
- down_write(&ieee1394_bus_type.subsys.rwsem);
if (ud->device.driver &&
(!ud->device.driver->suspend ||
ud->device.driver->suspend(&ud->device, PMSG_SUSPEND)))
device_release_driver(&ud->device);
- up_write(&ieee1394_bus_type.subsys.rwsem);
}
up(&nodemgr_ud_class.sem);
}
if (ud->ne != ne)
continue;
- down_read(&ieee1394_bus_type.subsys.rwsem);
if (ud->device.driver && ud->device.driver->resume)
ud->device.driver->resume(&ud->device);
- up_read(&ieee1394_bus_type.subsys.rwsem);
}
up(&nodemgr_ud_class.sem);
if (ud->ne != ne)
continue;
- down_write(&ieee1394_bus_type.subsys.rwsem);
if (ud->device.driver) {
pdrv = container_of(ud->device.driver,
struct hpsb_protocol_driver,
if (pdrv->update && pdrv->update(ud))
device_release_driver(&ud->device);
}
- up_write(&ieee1394_bus_type.subsys.rwsem);
}
up(&nodemgr_ud_class.sem);
}