Re: [PATCH 0/8] sa11x0 PCMCIA updates

2015-03-26 Thread Robert Jarzmik
Russell King - ARM Linux writes: > I will be testing the sa11x0 changes later today, but as I gave most > of my PXA2xx platforms to Robert, I need Robert to test this on the > Lubbock. I will be done this weekend Russell. Cheers. -- Robert ___ Linux

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Larry Finger
On 03/26/2015 10:08 AM, Nicholas Krause wrote: I looked through the clk Api and this seems the simplest way to do it. Can you send me your solution as I am curious how yours is better than mine. Furthermore I have finally come to the conclusion that my research efforts need to improve a

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Nicholas Krause
On March 26, 2015 11:42:22 AM EDT, Larry Finger wrote: >On 03/26/2015 10:08 AM, Nicholas Krause wrote: > > >> I looked through the clk Api and this seems the simplest way to do >it. Can you send me your solution as I am curious how yours is better >than mine. Furthermore I have finally com

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Nicholas Krause
On March 26, 2015 7:26:04 AM EDT, Russell King - ARM Linux wrote: >On Thu, Mar 26, 2015 at 07:14:38AM -0400, Nicholas Krause wrote: >> >> >> On March 26, 2015 5:52:25 AM EDT, Russell King - ARM Linux > wrote: >> >On Wed, Mar 25, 2015 at 11:15:52PM -0400, Nicholas Krause wrote: >> >> This fixe

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Nicholas Krause
On March 26, 2015 7:26:04 AM EDT, Russell King - ARM Linux wrote: >On Thu, Mar 26, 2015 at 07:14:38AM -0400, Nicholas Krause wrote: >> >> >> On March 26, 2015 5:52:25 AM EDT, Russell King - ARM Linux > wrote: >> >On Wed, Mar 25, 2015 at 11:15:52PM -0400, Nicholas Krause wrote: >> >> This fixe

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Russell King - ARM Linux
On Thu, Mar 26, 2015 at 07:14:38AM -0400, Nicholas Krause wrote: > > > On March 26, 2015 5:52:25 AM EDT, Russell King - ARM Linux > wrote: > >On Wed, Mar 25, 2015 at 11:15:52PM -0400, Nicholas Krause wrote: > >> This fixes the memory found when running coccinelle on the latest > > > >How does

[PATCH 8/8] pcmcia: soc_common: remove skt_dev_info's clk pointer

2015-03-26 Thread Russell King
We no longer need to store the clk pointer in struct skt_dev_info as we no longer need to remember the clk pointer for the cleanup paths. Signed-off-by: Russell King --- drivers/pcmcia/pxa2xx_base.c | 1 - drivers/pcmcia/sa11xx_base.c | 1 - drivers/pcmcia/soc_common.h | 1 - 3 files changed, 3

[PATCH 7/8] pcmcia: sa11xx_base.c: remove useless init/exit functions

2015-03-26 Thread Russell King
A library module is not required to have module init/exit functions. Get rid of these unnecessary functions. Signed-off-by: Russell King --- drivers/pcmcia/sa11xx_base.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c ind

[PATCH 6/8] pcmcia: sa1111: simplify clk handing in sa1111_pcmcia_add()

2015-03-26 Thread Russell King
clk_get(dev, NULL) will always refer to the same clock, so it's pointless calling this multiple times for the same device. As we no longer have to worry about the cleanup (via use of devm_clk_get()) we can simplify sa_pcmcia_add() too. Signed-off-by: Russell King --- drivers/pcmcia/sa_g

[PATCH 5/8] pcmcia: sa1111: update socket driver to use devm_clk_get() API

2015-03-26 Thread Russell King
Update the pxa2xx socket driver to use the devm_clk_get() API so that the cleanup paths are simplified. Signed-off-by: Russell King --- drivers/pcmcia/sa_generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pcmcia/sa_generic.c b/drivers/pcmcia/sa_ge

[PATCH 3/8] pcmcia: pxa2xx: update socket driver to use devm_clk_get() API

2015-03-26 Thread Russell King
Update the pxa2xx socket driver to use the devm_clk_get() API so that the cleanup paths are simplified. Signed-off-by: Russell King --- drivers/pcmcia/pxa2xx_base.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_ba

[PATCH 4/8] pcmcia: pxa2xx: convert memory allocation to devm_* API

2015-03-26 Thread Russell King
Convert the pxa2xx socket driver memory allocation to use devm_kzalloc() to simplify the cleanup path. Signed-off-by: Russell King --- drivers/pcmcia/pxa2xx_base.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_bas

[PATCH 2/8] pcmcia: sa11x0: convert memory allocation to devm_* API

2015-03-26 Thread Russell King
Convert the sa11x0 socket driver memory allocation to use devm_kzalloc() to simplify the cleanup path. Signed-off-by: Russell King --- drivers/pcmcia/sa1100_generic.c | 1 - drivers/pcmcia/sa11xx_base.c| 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pcmcia/sa11

[PATCH 1/8] pcmcia: sa11x0: fix missing clk_put() in sa11x0 socket drivers

2015-03-26 Thread Russell King
Fix the lack of clk_put() in sa11xx_base.c's error cleanup paths by converting the driver to the devm_* API. Fixes: 86d88bfca475 ("ARM: 8247/2: pcmcia: sa1100: make use of device clock") Signed-off-by: Russell King --- drivers/pcmcia/sa1100_generic.c | 1 - drivers/pcmcia/sa11xx_base.c| 3 +-

[PATCH 0/8] sa11x0 PCMCIA updates

2015-03-26 Thread Russell King - ARM Linux
Here's a collection of patches which cleans up and updates the SA11x0 and PXA2xx socket drivers, particularly converting them to the devm_* APIs to ensure that resources are properly cleaned up. I've stopped short of totally converting sa_generic as there are some corner cases where we want to

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Nicholas Krause
On March 26, 2015 5:52:25 AM EDT, Russell King - ARM Linux wrote: >On Wed, Mar 25, 2015 at 11:15:52PM -0400, Nicholas Krause wrote: >> This fixes the memory found when running coccinelle on the latest > >How does this "fix the memory" ? Is the memory faulty? > >> kernel tree for if we are una

Re: [PATCHv2] pcmcia:Fix memory leak in the function, sa11xx_drv_pcmcia_probe

2015-03-26 Thread Russell King - ARM Linux
On Wed, Mar 25, 2015 at 11:15:52PM -0400, Nicholas Krause wrote: > This fixes the memory found when running coccinelle on the latest How does this "fix the memory" ? Is the memory faulty? > kernel tree for if we are unable to successfully allocate memory > for the structure pointer,sinfo of typ