From patchwork Mon Mar 25 10:45:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 15585 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2BB5A23E64 for ; Mon, 25 Mar 2013 10:56:55 +0000 (UTC) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by fiordland.canonical.com (Postfix) with ESMTP id F0ADBA1929E for ; Mon, 25 Mar 2013 10:56:54 +0000 (UTC) Received: by mail-la0-f47.google.com with SMTP id fj20so10841168lab.6 for ; Mon, 25 Mar 2013 03:56:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=aFkGIjEnj7mNcFKYmCxy91m4ELkVwoDPULmZMLZvzCE=; b=WzK5xFYTKrS0cprCfY7qDAXnYZGKBUMO3gwxSX5JpWtQ35eI9L7Ph8AMJvZGwgIOLF bHnROKRqGobrqMdgsfqbvx8dIOEs8/UR66WakfT+FuIXOtzYq/2mXZQw0/jaBlhwxn05 2ppYV1ZghzOEsFZjQ/YB8cTmN4ofx9QbdvjtDX/F9vZFzFM9CeK4AZHcOYG3xsy3JsYM Yk2zG51m+NbrIwbgZVklDCNZeZepHm0kkW64o/QxNv/hDj8HGoiJNQpbgxY1fRLuMX+R weupW7I8XHg54AIIde9RNALnGEAhYD9+8N5d8nyTU3tmsM8BpCjyvW6s2XOgaAj/nxNp Ucmw== X-Received: by 10.112.145.8 with SMTP id sq8mr5828241lbb.55.1364209014523; Mon, 25 Mar 2013 03:56:54 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.112.147.5 with SMTP id tg5csp41235lbb; Mon, 25 Mar 2013 03:56:53 -0700 (PDT) X-Received: by 10.68.211.8 with SMTP id my8mr16759736pbc.7.1364209013059; Mon, 25 Mar 2013 03:56:53 -0700 (PDT) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id dj6si13317318pad.279.2013.03.25.03.56.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 03:56:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.41; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f41.google.com with SMTP id kx1so513167pab.14 for ; Mon, 25 Mar 2013 03:56:52 -0700 (PDT) X-Received: by 10.66.155.67 with SMTP id vu3mr17599205pab.70.1364209012382; Mon, 25 Mar 2013 03:56:52 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id y1sm13067861pbg.10.2013.03.25.03.56.49 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 Mar 2013 03:56:51 -0700 (PDT) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org, patches@linaro.org, Laxman dewangan Subject: [PATCH 2/6] drivers/rtc/rtc-tps6586x.c: Use devm_rtc_device_unregister Date: Mon, 25 Mar 2013 16:15:23 +0530 Message-Id: <1364208327-14207-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1364208327-14207-1-git-send-email-sachin.kamat@linaro.org> References: <1364208327-14207-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQn4AQoeATV2fVtmlNdzfeEmYiQIQ/v7mLZypEaFdjISPy70B/c4p7H+/ARaJqldZl6RyJy9 Using non-device managed unregister function with device managed register is not correct. Use the device managed version instead. Though device managed functions do not generally need explicit freeing/unregistering, in this case it is used to avoid any problems due to the ordering. Signed-off-by: Sachin Kamat Cc: Laxman dewangan --- drivers/rtc/rtc-tps6586x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index badfea4..ded8f74 100644 --- a/drivers/rtc/rtc-tps6586x.c +++ b/drivers/rtc/rtc-tps6586x.c @@ -296,7 +296,7 @@ static int tps6586x_rtc_probe(struct platform_device *pdev) return 0; fail_req_irq: - rtc_device_unregister(rtc->rtc); + devm_rtc_device_unregister(&pdev->dev, rtc->rtc); fail_rtc_register: tps6586x_update(tps_dev, RTC_CTRL, 0,