Skip to content

Commit

Permalink
kref: Fix typo in kref documentation
Browse files Browse the repository at this point in the history
container_of() should refer to the struct created in the example.

Signed-off-by: Javi Merino <cibervicho@gmail.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Javi Merino authored and Greg Kroah-Hartman committed Mar 7, 2011
1 parent f1a304e commit d5c97c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/kref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static struct my_data *get_entry()
struct my_data *entry = NULL;
mutex_lock(&mutex);
if (!list_empty(&q)) {
entry = container_of(q.next, struct my_q_entry, link);
entry = container_of(q.next, struct my_data, link);
kref_get(&entry->refcount);
}
mutex_unlock(&mutex);
Expand Down

0 comments on commit d5c97c1

Please sign in to comment.