Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752795Ab2FLGZt (ORCPT ); Tue, 12 Jun 2012 02:25:49 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:63631 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752447Ab2FLGZq convert rfc822-to-8bit (ORCPT ); Tue, 12 Jun 2012 02:25:46 -0400 MIME-Version: 1.0 Reply-To: axel.lin@gmail.com In-Reply-To: <000c01cd4766$b013b410$103b1c30$%han@samsung.com> References: <000c01cd4766$b013b410$103b1c30$%han@samsung.com> From: Axel Lin Date: Tue, 12 Jun 2012 14:25:25 +0800 Message-ID: Subject: Re: [PATCH v2 2/3][RESEND] backlight: ot200_bl: use devm_ functions To: Jingoo Han Cc: Andrew Morton , LKML , Richard Purdie , Christian Gmeiner Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 923 Lines: 26 > ?error_mfgpt_alloc: > ? ? ? ?gpio_free(GPIO_DIMM); You can also use devm_gpio_request, so you can remove gpio_free here and remove the gpio_free in ot200_backlight_remove(). > @@ -141,7 +139,6 @@ error_mfgpt_alloc: > ?static int ot200_backlight_remove(struct platform_device *pdev) > ?{ > ? ? ? ?struct backlight_device *bl = platform_get_drvdata(pdev); > - ? ? ? struct ot200_backlight_data *data = bl_get_data(bl); > > ? ? ? ?backlight_device_unregister(bl); > > @@ -154,7 +151,6 @@ static int ot200_backlight_remove(struct platform_device *pdev) > ? ? ? ?cs5535_mfgpt_free_timer(pwm_timer); > ? ? ? ?gpio_free(GPIO_DIMM); > > - ? ? ? kfree(data); > ? ? ? ?return 0; > ?} -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/