lkml.org 
[lkml]   [2011]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/4] pinctrl: Don't copy function name when requesting a pin
From
On Thu, Oct 20, 2011 at 12:19 AM, Stephen Warren <swarren@nvidia.com> wrote:

> Instead, store a pointer to the currently assigned function.
>
> This allows us to delete the mux_requested variable from pin_desc; a pin
> is requested if its currently assigned function is non-NULL.
>
> When a pin is requested as a GPIO rather than a regular function, the
> assigned function name is dynamically constructed. In this case, we have
> to kstrdup() the dynamically constructed name, so that mux_function doesn't
> pointed at stack data. This requires pin_free to be told whether to free
> the mux_function pointer or not.
>
> This removes the hard-coded maximum function name length.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

Thanks, applied.
Linus Walleij


\
 
 \ /
  Last update: 2011-10-20 11:51    [W:0.041 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site