From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylwester Nawrocki Subject: Re: [PATCH 1/2] i2c-s3c2410: Convert to devm_kzalloc() Date: Tue, 14 Feb 2012 14:52:58 +0100 Message-ID: <4F3A673A.9030001@samsung.com> References: <1327152527-11364-1-git-send-email-broonie@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT Return-path: In-reply-to: Sender: linux-samsung-soc-owner@vger.kernel.org To: Shubhrajyoti Datta Cc: Mark Brown , Jean Delvare , Wolfram Sang , Ben Dooks , linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org List-Id: linux-i2c@vger.kernel.org Hi Shubhrajyoti, On 02/14/2012 02:03 PM, Shubhrajyoti Datta wrote: > Hi Mark, > > The changes look good to me. > Reviewed-by: Datta Shubhrajyoti > For your changes. > > Some other doubts though not related to your patch. > Just curious. > ... >> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c >> index 4c17180..e6f982b 100644 >> --- a/drivers/i2c/busses/i2c-s3c2410.c >> +++ b/drivers/i2c/busses/i2c-s3c2410.c ... >> @@ -1061,7 +1060,6 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev) >> release_resource(i2c->ioarea); >> s3c24xx_i2c_dt_gpio_free(i2c); >> kfree(i2c->ioarea); > Do we need both release_resource and kfree No, instead of release_resource() and kfree() you normally use release_mem_region() to free resources acquired with request_mem_region(). See this patch for instance: http://www.spinics.net/lists/linux-samsung-soc/msg08325.html -- Thanks, Sylwester