From 2603bf219e9bef3396b96b65326de7db27958c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 7 Mar 2007 12:12:48 -0500 Subject: firewire: Use only a wait queue and terminate poll and read on device removal. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/firewire/fw-device.h') diff --git a/drivers/firewire/fw-device.h b/drivers/firewire/fw-device.h index 1a3655bea33..ba0e2463e4a 100644 --- a/drivers/firewire/fw-device.h +++ b/drivers/firewire/fw-device.h @@ -53,11 +53,18 @@ fw_device(struct device *dev) return container_of(dev, struct fw_device, device); } +static inline int +fw_device_is_shutdown(struct fw_device *device) +{ + return atomic_read(&device->state) == FW_DEVICE_SHUTDOWN; +} + struct fw_device *fw_device_get(struct fw_device *device); void fw_device_put(struct fw_device *device); int fw_device_enable_phys_dma(struct fw_device *device); void fw_device_cdev_update(struct fw_device *device); +void fw_device_cdev_remove(struct fw_device *device); struct fw_device *fw_device_from_devt(dev_t devt); extern int fw_cdev_major; -- cgit v1.2.3