diff options
author | Rupesh Gujare <rupesh.gujare@atmel.com> | 2013-08-13 17:24:21 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-14 21:13:43 (GMT) |
commit | 18f8191e1f35d65221ad3b7c68c08fe1c09edb1d (patch) | |
tree | 95a01f26501a256f994da237963dde07e12a81d9 /drivers/staging/ozwpan/ozeltbuf.c | |
parent | 100013fa1d15181dfefc22e61a2744e8e0ca3c00 (diff) | |
download | linux-fsl-qoriq-18f8191e1f35d65221ad3b7c68c08fe1c09edb1d.tar.xz |
staging: ozwpan: Add a blank line between declaraction and code.
This patch adds blank line between declaration &
code for readability.
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan/ozeltbuf.c')
-rw-r--r-- | drivers/staging/ozwpan/ozeltbuf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/ozwpan/ozeltbuf.c b/drivers/staging/ozwpan/ozeltbuf.c index 5e98aeb..0b8b468 100644 --- a/drivers/staging/ozwpan/ozeltbuf.c +++ b/drivers/staging/ozwpan/ozeltbuf.c @@ -35,6 +35,7 @@ void oz_elt_buf_term(struct oz_elt_buf *buf) { struct list_head *e; int i; + /* Free any elements in the order or isoc lists. */ for (i = 0; i < 2; i++) { struct list_head *list; @@ -65,6 +66,7 @@ void oz_elt_buf_term(struct oz_elt_buf *buf) struct oz_elt_info *oz_elt_info_alloc(struct oz_elt_buf *buf) { struct oz_elt_info *ei = NULL; + spin_lock_bh(&buf->lock); if (buf->free_elts && buf->elt_pool) { ei = container_of(buf->elt_pool, struct oz_elt_info, link); @@ -115,6 +117,7 @@ void oz_elt_info_free(struct oz_elt_buf *buf, struct oz_elt_info *ei) void oz_elt_info_free_chain(struct oz_elt_buf *buf, struct list_head *list) { struct list_head *e; + e = list->next; spin_lock_bh(&buf->lock); while (e != list) { @@ -151,6 +154,7 @@ int oz_elt_stream_delete(struct oz_elt_buf *buf, u8 id) { struct list_head *e; struct oz_elt_stream *st = NULL; + oz_dbg(ON, "%s: (0x%x)\n", __func__, id); spin_lock_bh(&buf->lock); e = buf->stream_list.next; @@ -208,6 +212,7 @@ int oz_queue_elt_info(struct oz_elt_buf *buf, u8 isoc, u8 id, { struct oz_elt_stream *st = NULL; struct list_head *e; + if (id) { list_for_each(e, &buf->stream_list) { st = container_of(e, struct oz_elt_stream, link); @@ -269,6 +274,7 @@ int oz_select_elts_for_tx(struct oz_elt_buf *buf, u8 isoc, unsigned *len, struct list_head *e; struct list_head *el; struct oz_elt_info *ei; + spin_lock_bh(&buf->lock); if (isoc) el = &buf->isoc_list; @@ -317,6 +323,7 @@ void oz_trim_elt_pool(struct oz_elt_buf *buf) { struct list_head *free = NULL; struct list_head *e; + spin_lock_bh(&buf->lock); while (buf->free_elts > buf->max_free_elts) { e = buf->elt_pool; |