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: 3635911 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 95AC39F369 for ; Wed, 12 Feb 2014 09:58:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5CB920165 for ; Wed, 12 Feb 2014 09:58:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E534F20160 for ; Wed, 12 Feb 2014 09:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbaBLJ6P (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=stIDN/8NflN6GAfIBjry7jHrT3xT+hk2hBCePhz1NGE=; b=UCIl+PRdx49KtSOkz1HGoNlRJJdAd/i5/mVH9kHTNdoIBrCHnEXVkkQn2znxAcDj3g 6u21RmJ50JndYPjU8BkGf+s2l+r9Q+JHyRjP3z9MnnBJOtWpjiBLJQaw6O5DOwugYTsU qYoK3hQ+TYvRv0MqvOtuSxjYJdcUTk/g/ZbhfL9n86tGkzHX1KK2BaUWUnCxlJgxvCus AJMJwW5LaECcQydwPrs9AGT83R0OsHcU9hlt5KxMFMHr/47FBCmtdIkf14OyT5CA+fdT L1YgTnS5od09o+Kc8HC6SPYNFnwBjZzQQsZpeBfArbNv9sRtWDYhxrMT4kmV+awXJsy3 DTeg== X-Gm-Message-State: ALoCoQk9+38MAfKjxaSHGtjtD5wSQea5+qGyjCkTdQHNiTV9l0Rl3x2uD+FO+GF/OYJGUbOGKz6v 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: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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