lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/11] mfd: ezx-pcap: use devm_request_irq() and devm_kzalloc()
On Wed, Feb 20, 2013 at 03:13:06PM +0900, Jingoo Han wrote:
> Use devm_request_irq() and devm_kzalloc() to make cleanup paths
> more simple.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> drivers/mfd/ezx-pcap.c | 16 +++++-----------
> 1 files changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
> index b7a61f0..8dea3a9 100644
> --- a/drivers/mfd/ezx-pcap.c
> +++ b/drivers/mfd/ezx-pcap.c
> @@ -403,7 +403,6 @@ static int ezx_pcap_remove(struct spi_device *spi)
> /* cleanup ADC */
> adc_irq = pcap_to_irq(pcap, (pdata->config & PCAP_SECOND_PORT) ?
> PCAP_IRQ_ADCDONE2 : PCAP_IRQ_ADCDONE);
> - free_irq(adc_irq, pcap);
> mutex_lock(&pcap->adc_mutex);
> for (i = 0; i < PCAP_ADC_MAXQ; i++)
> kfree(pcap->adc_queue[i]);
> @@ -415,8 +414,6 @@ static int ezx_pcap_remove(struct spi_device *spi)
>
> destroy_workqueue(pcap->workqueue);
>
> - kfree(pcap);
> -

I am pretty sure this conversion is wrong as well. Pretty much
work/workqueue and devm_request_irq() do not mix.

Thanks.

--
Dmitry


\
 
 \ /
  Last update: 2013-02-20 09:21    [W:0.080 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site