summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/csr/oska/Makefile1
-rw-r--r--drivers/staging/csr/oska/oska_module.c8
-rw-r--r--drivers/staging/csr/oska/refcount.c47
-rw-r--r--drivers/staging/csr/oska/refcount.h86
4 files changed, 0 insertions, 142 deletions
diff --git a/drivers/staging/csr/oska/Makefile b/drivers/staging/csr/oska/Makefile
index 57ae66d8749..d2aabb7c5c6 100644
--- a/drivers/staging/csr/oska/Makefile
+++ b/drivers/staging/csr/oska/Makefile
@@ -2,7 +2,6 @@ obj-$(CONFIG_CSR_WIFI) := csr_oska.o
csr_oska-y := \
list.o \
- refcount.o \
event.o \
oska_module.o \
print.o \
diff --git a/drivers/staging/csr/oska/oska_module.c b/drivers/staging/csr/oska/oska_module.c
index da125643d2d..2876ec2ade6 100644
--- a/drivers/staging/csr/oska/oska_module.c
+++ b/drivers/staging/csr/oska/oska_module.c
@@ -8,14 +8,6 @@
*/
#include <linux/module.h>
-#include "all.h"
-#include "refcount.h"
-
-EXPORT_SYMBOL(os_refcount_init);
-EXPORT_SYMBOL(os_refcount_destroy);
-EXPORT_SYMBOL(os_refcount_get);
-EXPORT_SYMBOL(os_refcount_put);
-
MODULE_DESCRIPTION("Operating System Kernel Abstraction");
MODULE_AUTHOR("Cambridge Silicon Radio Ltd.");
MODULE_LICENSE("GPL and additional rights");
diff --git a/drivers/staging/csr/oska/refcount.c b/drivers/staging/csr/oska/refcount.c
deleted file mode 100644
index 28abb64a9d2..00000000000
--- a/drivers/staging/csr/oska/refcount.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * OSKA generic implementation -- reference counting.
- *
- * Copyright (C) 2010 Cambridge Silicon Radio Ltd.
- *
- * Refer to LICENSE.txt included with this source code for details on
- * the license terms.
- */
-#include "refcount.h"
-#include "types.h"
-
-void os_refcount_init(os_refcount_t *refcount, os_refcount_callback_f func, void *arg)
-{
- os_spinlock_init(&refcount->lock);
- refcount->count = 1;
- refcount->func = func;
- refcount->arg = arg;
-}
-
-void os_refcount_destroy(os_refcount_t *refcount)
-{
- os_spinlock_destroy(&refcount->lock);
-}
-
-void os_refcount_get(os_refcount_t *refcount)
-{
- os_int_status_t istate;
-
- os_spinlock_lock_intsave(&refcount->lock, &istate);
- refcount->count++;
- os_spinlock_unlock_intrestore(&refcount->lock, &istate);
-}
-
-void os_refcount_put(os_refcount_t *refcount)
-{
- bool is_zero;
- os_int_status_t istate;
-
- os_spinlock_lock_intsave(&refcount->lock, &istate);
- refcount->count--;
- is_zero = refcount->count == 0;
- os_spinlock_unlock_intrestore(&refcount->lock, &istate);
-
- if (is_zero) {
- refcount->func(refcount->arg);
- }
-}
diff --git a/drivers/staging/csr/oska/refcount.h b/drivers/staging/csr/oska/refcount.h
deleted file mode 100644
index 741b00afcdf..00000000000
--- a/drivers/staging/csr/oska/refcount.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Operating system kernel abstraction -- reference counting.
- *
- * Copyright (C) 2010 Cambridge Silicon Radio Ltd.
- *
- * Refer to LICENSE.txt included with this source code for details on
- * the license terms.
- */
-#ifndef __OSKA_REFCOUNT_H
-#define __OSKA_REFCOUNT_H
-
-#include "spinlock.h"
-
-/**
- * @defgroup refcount Reference Counting
- *
- * A reference count is an atomic counter. A callback function is
- * called whenever the count reaches zero.
- *
- * A generic implementation is provided that is suitable for all
- * platforms that support the spinlock API in <oska/spinlock.h> (see
- * \ref spinlock).
- */
-
-typedef void (*os_refcount_callback_f)(void *arg);
-
-struct __os_refcount_impl {
- unsigned count;
- os_spinlock_t lock;
- os_refcount_callback_f func;
- void *arg;
-};
-
-/**
- * A reference count object.
- *
- * @ingroup refcount
- */
-typedef struct __os_refcount_impl os_refcount_t;
-
-/**
- * Initialize a reference count to 1.
- *
- * Initialized reference counts must be destroyed by calling
- * os_refcount_destroy().
- *
- * @param refcount the reference count.
- * @param func the function which will be called when the
- * reference count reaches 0.
- * @param arg an argument to pass to func.
- *
- * @ingroup refcount
- */
-void os_refcount_init(os_refcount_t *refcount, os_refcount_callback_f func, void *arg);
-
-/**
- * Destroy a reference count object.
- *
- * @param refcount the reference count.
- *
- * @ingroup refcount
- */
-void os_refcount_destroy(os_refcount_t *refcount);
-
-/**
- * Atomically increase the reference count by 1.
- *
- * @param refcount the reference count.
- *
- * @ingroup refcount
- */
-void os_refcount_get(os_refcount_t *refcount);
-
-/**
- * Atomically decrease the reference count by 1.
- *
- * The callback function passed to the call to os_refcount_init() is
- * called if the count was decreased to zero.
- *
- * @param refcount the reference count.
- *
- * @ingroup refcount
- */
-void os_refcount_put(os_refcount_t *refcount);
-
-#endif /* #ifndef __OSKA_REFCOUNT_H */