Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101344
b: refs/heads/master
c: 055a7da
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Jul 14, 2008
1 parent 684c660 commit 59d26e9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fde675fa2a1b07108976b42b20c9e69c80a53248
refs/heads/master: 055a7da0bb7b14f2f5009bf1c486a6e965e1e7ac
4 changes: 1 addition & 3 deletions trunk/drivers/ieee1394/highlevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,8 @@ void hpsb_register_highlevel(struct hpsb_highlevel *hl)
{
unsigned long flags;

hpsb_init_highlevel(hl);
INIT_LIST_HEAD(&hl->addr_list);
INIT_LIST_HEAD(&hl->host_info_list);

rwlock_init(&hl->host_info_lock);

down_write(&hl_drivers_sem);
list_add_tail(&hl->hl_list, &hl_drivers);
Expand Down
13 changes: 12 additions & 1 deletion trunk/drivers/ieee1394/highlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define IEEE1394_HIGHLEVEL_H

#include <linux/list.h>
#include <linux/spinlock_types.h>
#include <linux/spinlock.h>
#include <linux/types.h>

struct module;
Expand Down Expand Up @@ -103,6 +103,17 @@ int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store,
void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction,
void *data, size_t length);

/**
* hpsb_init_highlevel - initialize a struct hpsb_highlevel
*
* This is only necessary if hpsb_get_hostinfo_bykey can be called
* before hpsb_register_highlevel.
*/
static inline void hpsb_init_highlevel(struct hpsb_highlevel *hl)
{
rwlock_init(&hl->host_info_lock);
INIT_LIST_HEAD(&hl->host_info_list);
}
void hpsb_register_highlevel(struct hpsb_highlevel *hl);
void hpsb_unregister_highlevel(struct hpsb_highlevel *hl);

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/ieee1394/video1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,8 @@ static int __init video1394_init_module (void)
{
int ret;

hpsb_init_highlevel(&video1394_highlevel);

cdev_init(&video1394_cdev, &video1394_fops);
video1394_cdev.owner = THIS_MODULE;
ret = cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16);
Expand Down

0 comments on commit 59d26e9

Please sign in to comment.