aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-device.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-03-07 12:12:48 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:03:11 -0500
commit2603bf219e9bef3396b96b65326de7db27958c95 (patch)
tree1e18057a1a7e4f22c0b7eaec1b3330ad426cdb72 /drivers/firewire/fw-device.h
parent2aaad97be6b58ae865f402fcd27d138e7346ff81 (diff)
firewire: Use only a wait queue and terminate poll and read on device removal.
Drop the event list semaphore and only use the wait queue and the list to synchronize queue access. Break out of a poll or read whenever the device is disconnected. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-device.h')
-rw-r--r--drivers/firewire/fw-device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/firewire/fw-device.h b/drivers/firewire/fw-device.h
index 1a3655bea335..ba0e2463e4a7 100644
--- a/drivers/firewire/fw-device.h
+++ b/drivers/firewire/fw-device.h
@@ -53,11 +53,18 @@ fw_device(struct device *dev)
53 return container_of(dev, struct fw_device, device); 53 return container_of(dev, struct fw_device, device);
54} 54}
55 55
56static inline int
57fw_device_is_shutdown(struct fw_device *device)
58{
59 return atomic_read(&device->state) == FW_DEVICE_SHUTDOWN;
60}
61
56struct fw_device *fw_device_get(struct fw_device *device); 62struct fw_device *fw_device_get(struct fw_device *device);
57void fw_device_put(struct fw_device *device); 63void fw_device_put(struct fw_device *device);
58int fw_device_enable_phys_dma(struct fw_device *device); 64int fw_device_enable_phys_dma(struct fw_device *device);
59 65
60void fw_device_cdev_update(struct fw_device *device); 66void fw_device_cdev_update(struct fw_device *device);
67void fw_device_cdev_remove(struct fw_device *device);
61 68
62struct fw_device *fw_device_from_devt(dev_t devt); 69struct fw_device *fw_device_from_devt(dev_t devt);
63extern int fw_cdev_major; 70extern int fw_cdev_major;