RE: [PATCH] pinctrl: Store mapping table as a list of chunks

From: Stephen Warren
Date: Thu Feb 16 2012 - 12:35:32 EST


Stephen Warren wrote at Wednesday, February 15, 2012 2:01 PM:
> Instead of storing a single array of mapping table entries, which
> requires realloc()ing that array each time it's extended and copying
> the new data, simply store a list of pointers to the individual chunks.
> This also removes the need to copy the mapping table at all; a pointer
> is maintained to the original table, this saving memory.
...
> diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
...
> @@ -689,31 +719,17 @@ int __init pinctrl_register_mappings(struct pinctrl_map const *maps,
...
> + maps_node = kzalloc(sizeof(*maps), GFP_KERNEL);

That should be sizeof(*maps_node).

I'll post a respin of this with the rest of my pinctrl changes.

--
nvpublic

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/