diff options
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/highlevel.c | 4 | ||||
-rw-r--r-- | drivers/ieee1394/highlevel.h | 13 | ||||
-rw-r--r-- | drivers/ieee1394/video1394.c | 2 |
3 files changed, 15 insertions, 4 deletions
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c index fa2bfec0fca2..918ffc4fc8ac 100644 --- a/drivers/ieee1394/highlevel.c +++ b/drivers/ieee1394/highlevel.c | |||
@@ -228,10 +228,8 @@ void hpsb_register_highlevel(struct hpsb_highlevel *hl) | |||
228 | { | 228 | { |
229 | unsigned long flags; | 229 | unsigned long flags; |
230 | 230 | ||
231 | hpsb_init_highlevel(hl); | ||
231 | INIT_LIST_HEAD(&hl->addr_list); | 232 | INIT_LIST_HEAD(&hl->addr_list); |
232 | INIT_LIST_HEAD(&hl->host_info_list); | ||
233 | |||
234 | rwlock_init(&hl->host_info_lock); | ||
235 | 233 | ||
236 | down_write(&hl_drivers_sem); | 234 | down_write(&hl_drivers_sem); |
237 | list_add_tail(&hl->hl_list, &hl_drivers); | 235 | list_add_tail(&hl->hl_list, &hl_drivers); |
diff --git a/drivers/ieee1394/highlevel.h b/drivers/ieee1394/highlevel.h index eb9fe321e09a..bc5d0854c17e 100644 --- a/drivers/ieee1394/highlevel.h +++ b/drivers/ieee1394/highlevel.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define IEEE1394_HIGHLEVEL_H | 2 | #define IEEE1394_HIGHLEVEL_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/spinlock_types.h> | 5 | #include <linux/spinlock.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | 7 | ||
8 | struct module; | 8 | struct module; |
@@ -103,6 +103,17 @@ int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store, | |||
103 | void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, | 103 | void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, |
104 | void *data, size_t length); | 104 | void *data, size_t length); |
105 | 105 | ||
106 | /** | ||
107 | * hpsb_init_highlevel - initialize a struct hpsb_highlevel | ||
108 | * | ||
109 | * This is only necessary if hpsb_get_hostinfo_bykey can be called | ||
110 | * before hpsb_register_highlevel. | ||
111 | */ | ||
112 | static inline void hpsb_init_highlevel(struct hpsb_highlevel *hl) | ||
113 | { | ||
114 | rwlock_init(&hl->host_info_lock); | ||
115 | INIT_LIST_HEAD(&hl->host_info_list); | ||
116 | } | ||
106 | void hpsb_register_highlevel(struct hpsb_highlevel *hl); | 117 | void hpsb_register_highlevel(struct hpsb_highlevel *hl); |
107 | void hpsb_unregister_highlevel(struct hpsb_highlevel *hl); | 118 | void hpsb_unregister_highlevel(struct hpsb_highlevel *hl); |
108 | 119 | ||
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index e24772d336e1..069b9f6bf16d 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c | |||
@@ -1503,6 +1503,8 @@ static int __init video1394_init_module (void) | |||
1503 | { | 1503 | { |
1504 | int ret; | 1504 | int ret; |
1505 | 1505 | ||
1506 | hpsb_init_highlevel(&video1394_highlevel); | ||
1507 | |||
1506 | cdev_init(&video1394_cdev, &video1394_fops); | 1508 | cdev_init(&video1394_cdev, &video1394_fops); |
1507 | video1394_cdev.owner = THIS_MODULE; | 1509 | video1394_cdev.owner = THIS_MODULE; |
1508 | ret = cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16); | 1510 | ret = cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16); |