diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-12-07 04:57:19 -0500 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-12-07 04:57:19 -0500 |
| commit | 8d1413b28033c49c7f1a4d320e815d7a5531acee (patch) | |
| tree | b37281abef014cd60803b81c100388d7a475d49e /drivers/char/hvsi.c | |
| parent | ed25ffa16434724f5ed825aa48734c7f3aefa203 (diff) | |
| parent | 620034c84d1d939717bdfbe02c51a3fee43541c3 (diff) | |
Merge branch 'master' into upstream
Conflicts:
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_main.c
Diffstat (limited to 'drivers/char/hvsi.c')
| -rw-r--r-- | drivers/char/hvsi.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 2cf63e7305a3..82a41d5b4ed0 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | #define __ALIGNED__ __attribute__((__aligned__(sizeof(long)))) | 69 | #define __ALIGNED__ __attribute__((__aligned__(sizeof(long)))) |
| 70 | 70 | ||
| 71 | struct hvsi_struct { | 71 | struct hvsi_struct { |
| 72 | struct work_struct writer; | 72 | struct delayed_work writer; |
| 73 | struct work_struct handshaker; | 73 | struct work_struct handshaker; |
| 74 | wait_queue_head_t emptyq; /* woken when outbuf is emptied */ | 74 | wait_queue_head_t emptyq; /* woken when outbuf is emptied */ |
| 75 | wait_queue_head_t stateq; /* woken when HVSI state changes */ | 75 | wait_queue_head_t stateq; /* woken when HVSI state changes */ |
| @@ -744,9 +744,10 @@ static int hvsi_handshake(struct hvsi_struct *hp) | |||
| 744 | return 0; | 744 | return 0; |
| 745 | } | 745 | } |
| 746 | 746 | ||
| 747 | static void hvsi_handshaker(void *arg) | 747 | static void hvsi_handshaker(struct work_struct *work) |
| 748 | { | 748 | { |
| 749 | struct hvsi_struct *hp = (struct hvsi_struct *)arg; | 749 | struct hvsi_struct *hp = |
| 750 | container_of(work, struct hvsi_struct, handshaker); | ||
| 750 | 751 | ||
| 751 | if (hvsi_handshake(hp) >= 0) | 752 | if (hvsi_handshake(hp) >= 0) |
| 752 | return; | 753 | return; |
| @@ -951,9 +952,10 @@ static void hvsi_push(struct hvsi_struct *hp) | |||
| 951 | } | 952 | } |
| 952 | 953 | ||
| 953 | /* hvsi_write_worker will keep rescheduling itself until outbuf is empty */ | 954 | /* hvsi_write_worker will keep rescheduling itself until outbuf is empty */ |
| 954 | static void hvsi_write_worker(void *arg) | 955 | static void hvsi_write_worker(struct work_struct *work) |
| 955 | { | 956 | { |
| 956 | struct hvsi_struct *hp = (struct hvsi_struct *)arg; | 957 | struct hvsi_struct *hp = |
| 958 | container_of(work, struct hvsi_struct, writer.work); | ||
| 957 | unsigned long flags; | 959 | unsigned long flags; |
| 958 | #ifdef DEBUG | 960 | #ifdef DEBUG |
| 959 | static long start_j = 0; | 961 | static long start_j = 0; |
| @@ -1287,8 +1289,8 @@ static int __init hvsi_console_init(void) | |||
| 1287 | } | 1289 | } |
| 1288 | 1290 | ||
| 1289 | hp = &hvsi_ports[hvsi_count]; | 1291 | hp = &hvsi_ports[hvsi_count]; |
| 1290 | INIT_WORK(&hp->writer, hvsi_write_worker, hp); | 1292 | INIT_DELAYED_WORK(&hp->writer, hvsi_write_worker); |
| 1291 | INIT_WORK(&hp->handshaker, hvsi_handshaker, hp); | 1293 | INIT_WORK(&hp->handshaker, hvsi_handshaker); |
| 1292 | init_waitqueue_head(&hp->emptyq); | 1294 | init_waitqueue_head(&hp->emptyq); |
| 1293 | init_waitqueue_head(&hp->stateq); | 1295 | init_waitqueue_head(&hp->stateq); |
| 1294 | spin_lock_init(&hp->lock); | 1296 | spin_lock_init(&hp->lock); |
