diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-19 17:44:09 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-19 17:44:09 -0700 |
commit | c30fbb3c1e4d55f8444fd802d7e2faf1da8323f9 (patch) | |
tree | abc4c4e7e9c0e8a9fbd1c1ca798a5e975e73c3df /drivers | |
parent | 9f47550adbe8e3496b88c54400c58986b27f33da (diff) | |
download | linux-3.10-c30fbb3c1e4d55f8444fd802d7e2faf1da8323f9.tar.gz linux-3.10-c30fbb3c1e4d55f8444fd802d7e2faf1da8323f9.tar.bz2 linux-3.10-c30fbb3c1e4d55f8444fd802d7e2faf1da8323f9.zip |
staging: csr: oska: remove list.c and list.h
No one is using these functions, so remove them.
Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/csr/oska/Makefile | 1 | ||||
-rw-r--r-- | drivers/staging/csr/oska/list.c | 99 | ||||
-rw-r--r-- | drivers/staging/csr/oska/list.h | 115 |
3 files changed, 0 insertions, 215 deletions
diff --git a/drivers/staging/csr/oska/Makefile b/drivers/staging/csr/oska/Makefile index d2aabb7c5c6..92d3f865bd2 100644 --- a/drivers/staging/csr/oska/Makefile +++ b/drivers/staging/csr/oska/Makefile @@ -1,7 +1,6 @@ obj-$(CONFIG_CSR_WIFI) := csr_oska.o csr_oska-y := \ - list.o \ event.o \ oska_module.o \ print.o \ diff --git a/drivers/staging/csr/oska/list.c b/drivers/staging/csr/oska/list.c deleted file mode 100644 index 7d26c4a69c0..00000000000 --- a/drivers/staging/csr/oska/list.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Operating system kernel abstraction -- linked lists. - * - * Copyright (C) 2009-2010 Cambridge Silicon Radio Ltd. - * - * Refer to LICENSE.txt included with this source code for details on - * the license terms. - */ - -#include <stddef.h> -#include "list.h" - -/** - * Initialize an empty list. - * - * @ingroup list - */ -void os_list_init(struct os_list *list) -{ - list->head.next = list->head.prev = &list->head; -} - -/** - * Is the list empty? - * - * @return true iff the list contains no nodes. - * - * @ingroup list - */ -int os_list_empty(struct os_list *list) -{ - return list->head.next == &list->head; -} - -static void os_list_add(struct os_list_node *prev, struct os_list_node *new, - struct os_list_node *next) -{ - next->prev = new; - new->next = next; - new->prev = prev; - prev->next = new; -} - -/** - * Add a node to the tail of the list. - * - * @param list the list. - * @param node the list node to add. - * - * @ingroup list - */ -void os_list_add_tail(struct os_list *list, struct os_list_node *node) -{ - os_list_add(list->head.prev, node, &list->head); -} - -/** - * Remove a node from a list. - * - * @param node the node to remove. - * - * @ingroup list - */ -void os_list_del(struct os_list_node *node) -{ - node->prev->next = node->next; - node->next->prev = node->prev; - - node->prev = node->next = NULL; -} - -/** - * The node at the head of the list. - * - * @param list the list. - * - * @return the node at the head of the list; or os_list_end() if the - * list is empty. - * - * @ingroup list - */ -struct os_list_node *os_list_head(struct os_list *list) -{ - return list->head.next; -} - -/** - * The node marking the end of a list. - * - * @param list the list. - * - * @return the node that marks the end of the list. - * - * @ingroup list - */ -struct os_list_node *os_list_end(struct os_list *list) -{ - return &list->head; -} diff --git a/drivers/staging/csr/oska/list.h b/drivers/staging/csr/oska/list.h deleted file mode 100644 index a69b3b7d96b..00000000000 --- a/drivers/staging/csr/oska/list.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Operating system kernel abstraction -- linked lists. - * - * Copyright (C) 2009-2010 Cambridge Silicon Radio Ltd. - * - * Refer to LICENSE.txt included with this source code for details on - * the license terms. - */ -#ifndef __OSKA_LIST_H -#define __OSKA_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup list Linked Lists - * - * Generic linked list implementations suitable for all platforms. - * - * - Circular, doubly-linked list (struct os_list). - */ - -/** - * A list node. - * - * This list node structure should be the first field within any - * structure that is to be stored in a list. - * - * @see struct os_list - * @ingroup list - */ -struct os_list_node { - /** - * The pointer to the previous node in the list, or os_list_end() - * if the end of the list has been reached. - */ - struct os_list_node *prev; - /** - * The pointer to the next node in the list, or os_list_end() if - * the end of the list has been reached. - */ - struct os_list_node *next; -}; - -/** - * A circular, doubly-linked list of nodes. - * - * Structures to be stored in a list should contains a struct - * os_list_node as the \e first field. - * \code - * struct foo { - * struct os_list_node node; - * int bar; - * ... - * }; - * \endcode - * Going to/from a struct foo to a list node is then simple. - * \code - * struct os_list_node *node; - * struct foo *foo; - * [...] - * node = &foo->node; - * foo = (struct foo *)node - * \endcode - * Lists must be initialized with os_list_init() before adding nodes - * with os_list_add_tail(). The node at the head of the list is - * obtained with os_list_head(). Nodes are removed from the list with - * os_list_del(). - * - * A list can be interated from the head to the tail using: - * \code - * struct os_list_node *node; - * for (node = os_list_head(list); node != os_list_end(list); node = node->next) { - * struct foo *foo = (struct foo *)node; - * ... - * } - * \endcode - * - * In the above loop, the current list node cannot be removed (with - * os_list_del()). If this is required use this form of loop: - * \code - * struct os_list_node *node, *next; - * for (node = os_list_head(list), next = node->next; - * node != os_list_end(list); - * node = next, next = node->next) { - * struct foo *foo = (struct foo *)node; - * ... - * os_list_del(node); - * ... - * } - * \endcode - * - * @ingroup list - */ -struct os_list { - /** - * @internal - * The dummy node marking the end of the list. - */ - struct os_list_node head; -}; - -void os_list_init(struct os_list *list); -int os_list_empty(struct os_list *list); -void os_list_add_tail(struct os_list *list, struct os_list_node *node); -void os_list_del(struct os_list_node *node); -struct os_list_node *os_list_head(struct os_list *list); -struct os_list_node *os_list_end(struct os_list *list); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* #ifndef __OSKA_LIST_H */ |