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>
This commit is contained in:
committed by
Stefan Richter
parent
344bbc4de1
commit
a3aca3dabb
@@ -39,7 +39,7 @@ struct fw_device {
|
||||
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 @@ int fw_device_enable_phys_dma(struct fw_device *device);
|
||||
|
||||
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;
|
||||
|
Reference in New Issue
Block a user