Commit 2b0ff43a authored by Laurentiu Tudor's avatar Laurentiu Tudor Committed by Greg Kroah-Hartman

staging: fsl-mc/dpio: remove incomplete refcount implementation

There's an unfinished implementation of reference counting for dpaa2_io
structure using atomics. Since it's unused lets remove it for now and,
if needed at a later time, make use of krefs instead of rolling our
own refcounting.
Signed-off-by: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8ba6b44a
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include "qbman-portal.h" #include "qbman-portal.h"
struct dpaa2_io { struct dpaa2_io {
atomic_t refs;
struct dpaa2_io_desc dpio_desc; struct dpaa2_io_desc dpio_desc;
struct qbman_swp_desc swp_desc; struct qbman_swp_desc swp_desc;
struct qbman_swp *swp; struct qbman_swp *swp;
...@@ -126,7 +125,6 @@ struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc) ...@@ -126,7 +125,6 @@ struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc)
return NULL; return NULL;
} }
atomic_set(&obj->refs, 1);
obj->dpio_desc = *desc; obj->dpio_desc = *desc;
obj->swp_desc.cena_bar = obj->dpio_desc.regs_cena; obj->swp_desc.cena_bar = obj->dpio_desc.regs_cena;
obj->swp_desc.cinh_bar = obj->dpio_desc.regs_cinh; obj->swp_desc.cinh_bar = obj->dpio_desc.regs_cinh;
...@@ -171,8 +169,6 @@ EXPORT_SYMBOL(dpaa2_io_create); ...@@ -171,8 +169,6 @@ EXPORT_SYMBOL(dpaa2_io_create);
*/ */
void dpaa2_io_down(struct dpaa2_io *d) void dpaa2_io_down(struct dpaa2_io *d)
{ {
if (!atomic_dec_and_test(&d->refs))
return;
kfree(d); kfree(d);
} }
EXPORT_SYMBOL(dpaa2_io_down); EXPORT_SYMBOL(dpaa2_io_down);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment