Re: Change gpio-reulator-probe() to use managed resources.

2014-06-19 Thread Mark Brown
On Thu, Jun 19, 2014 at 04:46:01PM +0100, Rob Jones wrote: > Add new managed resource functions as needed to achieve this. > > Amend the following functions: You appear to have omitted the actual patch, I'm quoting the entire mail here. Please see Documentation/SubmittingPatches for some tips on

Re: [PATCH 3/4] drivers/base: devres.c: use devm_kmemdup() from with devm_kstrdup()

2014-06-19 Thread Joe Perches
On Thu, 2014-06-19 at 16:46 +0100, Rob Jones wrote: > Avoid code duplication by using devm_kmemdup() to copy data instead > of having a separate loop within devm_kstrdup(). > > Reviewed-by: Ian Molton > Signed-off-by: Rob Jones [] > diff --git a/drivers/base/devres.c b/drivers/base/devres.c [] >

[PATCH 4/4] drivers/regulator: gpio-regulator.c: use managed resources for probe.

2014-06-19 Thread Rob Jones
Use managed resource functions for all resource allocations in gpio_regulator_probe(). Remove gpio_regulator_remove() as it is now redundant. Reviewed-by: Ian Molton Signed-off-by: Rob Jones --- drivers/regulator/gpio-regulator.c | 70 1 file changed, 23

[PATCH 3/4] drivers/base: devres.c: use devm_kmemdup() from with devm_kstrdup()

2014-06-19 Thread Rob Jones
Avoid code duplication by using devm_kmemdup() to copy data instead of having a separate loop within devm_kstrdup(). Reviewed-by: Ian Molton Signed-off-by: Rob Jones --- drivers/base/devres.c |9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/base/devres.c b/

[PATCH 1/4] drivers/gpio: devres.c: allow gpio array requests for managed devices

2014-06-19 Thread Rob Jones
Add functions devm_gpio_request_array() and devm_gpio_free_array() which are exactly analogous to the equivalent non-managed device functions gpio_request_array() and gpio_free_array(), which can be found in the module gpiolib.c. Note that if devm_gpio_request_array() fails, no gpios are obtained.

Change gpio-reulator-probe() to use managed resources.

2014-06-19 Thread Rob Jones
Add new managed resource functions as needed to achieve this. Amend the following functions: devm_kstrdup() gpio_regulator_probe() Add the following functions: devm_kmemdup() devm_gpio_request_array() devm_gpio_free_array() Remove the following functions: gpio_regulator_remove() >From Rob J

[PATCH 2/4] drivers/base: devres.c: Add block copy func. for managed devices

2014-06-19 Thread Rob Jones
Add function devm_kmemdup(). Reviewed-by: Ian Molton Signed-off-by: Rob Jones --- drivers/base/devres.c | 27 ++- include/linux/device.h |2 ++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/base/devres.c b/drivers/base/devres.c index db4e2

Re: [PATCH] gpio: crystalcove: Fix implicit declaration of function 'seq_printf' error

2014-06-19 Thread Lee Jones
On Fri, 20 Jun 2014, Alexandre Courbot wrote: > On Fri, Jun 20, 2014 at 12:03 AM, Lee Jones wrote: > > drivers/gpio/gpio-crystalcove.c: In function 'crystalcove_gpio_dbg_show': > > drivers/gpio/gpio-crystalcove.c:286:3: error: implicit declaration of > > function 'seq_printf' > >seq_printf(s

Re: [PATCH] gpio: crystalcove: Fix implicit declaration of function 'seq_printf' error

2014-06-19 Thread Alexandre Courbot
On Fri, Jun 20, 2014 at 12:03 AM, Lee Jones wrote: > drivers/gpio/gpio-crystalcove.c: In function 'crystalcove_gpio_dbg_show': > drivers/gpio/gpio-crystalcove.c:286:3: error: implicit declaration of > function 'seq_printf' >seq_printf(s, " gpio-%-2d %s %s %s %s ctlo=%2x,%s %s %s\n", > > Repor

[PATCH] gpio: crystalcove: Fix implicit declaration of function 'seq_printf' error

2014-06-19 Thread Lee Jones
drivers/gpio/gpio-crystalcove.c: In function 'crystalcove_gpio_dbg_show': drivers/gpio/gpio-crystalcove.c:286:3: error: implicit declaration of function 'seq_printf' seq_printf(s, " gpio-%-2d %s %s %s %s ctlo=%2x,%s %s %s\n", Reported-by: Stephen Rothwell Signed-off-by: Lee Jones --- I'm loo