firewire: Switch cdev code over to use register_chrdev and keep a list of devices.

The old mechanism kept a struct cdev for each fw device, but fops->release
would reference this struct after the device got freed in some cases.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
diff --git a/drivers/firewire/fw-device.h b/drivers/firewire/fw-device.h
index 4f731c2..1a3655b 100644
--- a/drivers/firewire/fw-device.h
+++ b/drivers/firewire/fw-device.h
@@ -39,7 +39,7 @@
 	int generation;
 	struct fw_card *card;
 	struct device device;
-	struct cdev cdev;
+	struct list_head link;
 	struct list_head client_list;
 	__be32 *config_rom;
 	size_t config_rom_length;
@@ -59,6 +59,9 @@
 
 void fw_device_cdev_update(struct fw_device *device);
 
+struct fw_device *fw_device_from_devt(dev_t devt);
+extern int fw_cdev_major;
+
 struct fw_unit {
 	struct device device;
 	u32 *directory;