diff options
Diffstat (limited to 'drivers/ieee1394/ieee1394_core.h')
-rw-r--r-- | drivers/ieee1394/ieee1394_core.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h index 21d50f73a21..28b9f58bafd 100644 --- a/drivers/ieee1394/ieee1394_core.h +++ b/drivers/ieee1394/ieee1394_core.h @@ -5,6 +5,7 @@ #include <linux/fs.h> #include <linux/list.h> #include <linux/types.h> +#include <linux/cdev.h> #include <asm/atomic.h> #include "hosts.h" @@ -155,7 +156,10 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size, */ static inline unsigned char ieee1394_file_to_instance(struct file *file) { - return file->f_path.dentry->d_inode->i_cindex; + int idx = cdev_index(file->f_path.dentry->d_inode); + if (idx < 0) + idx = 0; + return idx; } extern int hpsb_disable_irm; |