From patchwork Wed Feb 12 09:52:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24526 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 97133203F3 for ; Wed, 12 Feb 2014 09:58:19 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id g12sf38065271oah.2 for ; Wed, 12 Feb 2014 01:58:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=gUUHXEAznX1nwd+olG11/iR2/V83qtqU2Qbb8ZGBtgs=; b=B/zZ9e6FeT4IRY/VBa2qCJ99G/B2iOE8Op8xssa7pysxx0vAdybXIvChAUFTHzwOBL 7QfpayGbL3FpJE+dZMfshjwH7IOi9Iby2yDmtnUDMUJOZROMi9ThSxhG4p3HUXl8uAih XnoPl3vNWyX0keqK4Oh553epRf1vFQiNfo2vE864wpY5cpg8dxwzgA8Y7ZtyRdLjNKAx COLh77kTWxo5e9KABb59EakiOd+IyzOqwAifcbhTjadP8LCq+nJIVX0VxJD4+C5q73TX oT9jDlrHYc1nnyCeCoUxGhOQmn5esoyjWULCt9WZYu/Imr409MqDVUZEhtAnKe6x2q3r DBzw== X-Gm-Message-State: ALoCoQk5w65b3CfXQhKD5A/90ZI5VrMqI5m+M7spm7can4l5l7DCyhjTxganumc8JDP992rdx5T2 X-Received: by 10.182.251.230 with SMTP id zn6mr1392128obc.14.1392199098710; Wed, 12 Feb 2014 01:58:18 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.109.137 with SMTP id l9ls2867584qgf.40.gmail; Wed, 12 Feb 2014 01:58:18 -0800 (PST) X-Received: by 10.58.235.129 with SMTP id um1mr33107182vec.17.1392199098496; Wed, 12 Feb 2014 01:58:18 -0800 (PST) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id uw4si7112173vdc.14.2014.02.12.01.58.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 01:58:18 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.48; Received: by mail-vb0-f48.google.com with SMTP id q16so6822143vbe.35 for ; Wed, 12 Feb 2014 01:58:18 -0800 (PST) X-Received: by 10.52.246.133 with SMTP id xw5mr368348vdc.32.1392199098258; Wed, 12 Feb 2014 01:58:18 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp24160vcz; Wed, 12 Feb 2014 01:58:17 -0800 (PST) X-Received: by 10.68.135.137 with SMTP id ps9mr16477223pbb.160.1392199097265; Wed, 12 Feb 2014 01:58:17 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si22123468pae.230.2014.02.12.01.58.16; Wed, 12 Feb 2014 01:58:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbaBLJ6P (ORCPT + 1 other); Wed, 12 Feb 2014 04:58:15 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:58357 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751153AbaBLJ6N (ORCPT ); Wed, 12 Feb 2014 04:58:13 -0500 Received: by mail-pb0-f44.google.com with SMTP id rq2so9077643pbb.3 for ; Wed, 12 Feb 2014 01:58:12 -0800 (PST) X-Received: by 10.68.211.1 with SMTP id my1mr50693795pbc.55.1392199092581; Wed, 12 Feb 2014 01:58:12 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id db3sm61820967pbb.10.2014.02.12.01.58.10 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 01:58:11 -0800 (PST) From: Sachin Kamat To: linux-fbdev@vger.kernel.org Cc: tomi.valkeinen@ti.com, sachin.kamat@linaro.org Subject: [PATCH 1/1] video: s6e8ax0: Use devm_* APIs Date: Wed, 12 Feb 2014 15:22:59 +0530 Message-Id: <1392198779-5203-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-fbdev-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , devm_* APIs make the cleanup paths simpler. Signed-off-by: Sachin Kamat --- drivers/video/exynos/s6e8ax0.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/video/exynos/s6e8ax0.c b/drivers/video/exynos/s6e8ax0.c index ca2602413aa4..29e70ed3f154 100644 --- a/drivers/video/exynos/s6e8ax0.c +++ b/drivers/video/exynos/s6e8ax0.c @@ -794,19 +794,18 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev) return ret; } - lcd->ld = lcd_device_register("s6e8ax0", lcd->dev, lcd, + lcd->ld = devm_lcd_device_register(lcd->dev, "s6e8ax0", lcd->dev, lcd, &s6e8ax0_lcd_ops); if (IS_ERR(lcd->ld)) { dev_err(lcd->dev, "failed to register lcd ops.\n"); return PTR_ERR(lcd->ld); } - lcd->bd = backlight_device_register("s6e8ax0-bl", lcd->dev, lcd, - &s6e8ax0_backlight_ops, NULL); + lcd->bd = devm_backlight_device_register(lcd->dev, "s6e8ax0-bl", + lcd->dev, lcd, &s6e8ax0_backlight_ops, NULL); if (IS_ERR(lcd->bd)) { dev_err(lcd->dev, "failed to register backlight ops.\n"); - ret = PTR_ERR(lcd->bd); - goto err_backlight_register; + return PTR_ERR(lcd->bd); } lcd->bd->props.max_brightness = MAX_BRIGHTNESS; @@ -834,10 +833,6 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev) dev_dbg(lcd->dev, "probed s6e8ax0 panel driver.\n"); return 0; - -err_backlight_register: - lcd_device_unregister(lcd->ld); - return ret; } #ifdef CONFIG_PM