Home
last modified time | relevance | path

Searched hist:"5 d2eaf8090874f8e65388e82f7e91f9cef74885e" (Results 1 – 2 of 2) sorted by relevance

/linux/drivers/pinctrl/
H A Dcore.hdiff 5d2eaf8090874f8e65388e82f7e91f9cef74885e Thu Oct 20 00:19:28 CEST 2011 Stephen Warren <swarren@nvidia.com> pinctrl: Don't copy function name when requesting a pin

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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
H A Dpinmux.cdiff 5d2eaf8090874f8e65388e82f7e91f9cef74885e Thu Oct 20 00:19:28 CEST 2011 Stephen Warren <swarren@nvidia.com> pinctrl: Don't copy function name when requesting a pin

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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>