diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2012-05-30 15:02:24 -0400 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-05 17:53:25 -0400 |
commit | 7183a2a799b81490354973117ecd810c23cdc668 (patch) | |
tree | cfd720d9a745f8d010120ca434246336423aea32 /include/linux/remoteproc.h | |
parent | b5ab5e24e960b9f780a4cc96815cfd4b0d412720 (diff) |
remoteproc: remove the now-redundant kref
Now that every rproc instance contains a device, we don't need a
kref anymore to maintain the refcount of the rproc instances:
that's what device are good with!
This patch removes the now-redundant kref, and switches to
{get, put}_device instead of kref_{get, put}.
We also don't need the kref's release function anymore, and instead,
we just utilize the class's release handler (which is now responsible
for all memory de-allocations).
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r-- | include/linux/remoteproc.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 7f806dcf5278..cbe8a51a21de 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h | |||
@@ -36,7 +36,6 @@ | |||
36 | #define REMOTEPROC_H | 36 | #define REMOTEPROC_H |
37 | 37 | ||
38 | #include <linux/types.h> | 38 | #include <linux/types.h> |
39 | #include <linux/kref.h> | ||
40 | #include <linux/klist.h> | 39 | #include <linux/klist.h> |
41 | #include <linux/mutex.h> | 40 | #include <linux/mutex.h> |
42 | #include <linux/virtio.h> | 41 | #include <linux/virtio.h> |
@@ -370,7 +369,6 @@ enum rproc_state { | |||
370 | * @priv: private data which belongs to the platform-specific rproc module | 369 | * @priv: private data which belongs to the platform-specific rproc module |
371 | * @ops: platform-specific start/stop rproc handlers | 370 | * @ops: platform-specific start/stop rproc handlers |
372 | * @dev: virtual device for refcounting and common remoteproc behavior | 371 | * @dev: virtual device for refcounting and common remoteproc behavior |
373 | * @refcount: refcount of users that have a valid pointer to this rproc | ||
374 | * @power: refcount of users who need this rproc powered up | 372 | * @power: refcount of users who need this rproc powered up |
375 | * @state: state of the device | 373 | * @state: state of the device |
376 | * @lock: lock which protects concurrent manipulations of the rproc | 374 | * @lock: lock which protects concurrent manipulations of the rproc |
@@ -393,7 +391,6 @@ struct rproc { | |||
393 | void *priv; | 391 | void *priv; |
394 | const struct rproc_ops *ops; | 392 | const struct rproc_ops *ops; |
395 | struct device dev; | 393 | struct device dev; |
396 | struct kref refcount; | ||
397 | atomic_t power; | 394 | atomic_t power; |
398 | unsigned int state; | 395 | unsigned int state; |
399 | struct mutex lock; | 396 | struct mutex lock; |