Skip to content

Commit

Permalink
[PATCH] uml: mmapper - remove just added but wrong "const" attribute
Browse files Browse the repository at this point in the history
When enabling the mmapper driver I got warnings because this "const"
miscdevice structure is passed to function as non-const pointer; unlike struct
tty_operations, however, I verified that misc_{de,}register _do_ modify their
parameter, so this const attribute must be removed.

Since the purpose of the change was to guarantee that no lock was needed, add
a comment to prove this differently.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Oct 20, 2006
1 parent f43e6a5 commit 1ba0ce6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/um/drivers/mmapper_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ static const struct file_operations mmapper_fops = {
.release = mmapper_release,
};

static const struct miscdevice mmapper_dev = {
/* No locking needed - only used (and modified) by below initcall and exitcall. */
static struct miscdevice mmapper_dev = {
.minor = MISC_DYNAMIC_MINOR,
.name = "mmapper",
.fops = &mmapper_fops
Expand Down

0 comments on commit 1ba0ce6

Please sign in to comment.