lkml.org 
[lkml]   [2012]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers/i2c/i2c-smbus.c: convert kzalloc to devm_kzalloc
Hi Julia,

On Sat, 4 Aug 2012 19:10:48 +0200, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Converting kzalloc to devm_kzalloc simplifies the code and ensures that the
> result, alert, is freed after the irq allocated by the subsequent
> devm_request_irq. This in turn ensures that when an interrupt can be
> triggered, the alert structure is still available.

Good point. I honestly have no idea why this driver's resources are
half managed, it doesn't make much sense...

Patch applied, with a comment clarified, thanks.

--
Jean Delvare


\
 
 \ /
  Last update: 2012-08-04 22:21    [W:0.166 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site