From patchwork Sun Sep 19 10:22:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 65154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pw0-f56.google.com (mail-pw0-f56.google.com [209.85.160.56]) by ozlabs.org (Postfix) with ESMTP id C1609B6EE9 for ; Sun, 19 Sep 2010 20:23:14 +1000 (EST) Received: by pwi1 with SMTP id 1sf582703pwi.11 for ; Sun, 19 Sep 2010 03:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:received:received:subject:from:to:cc :date:message-id:mime-version:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=gwczwm7FmFpLoHuRXtXgjvo+Mn6cE/cwSbc/He/kaEg=; b=SVzl6Y9s4CoqDJsgNjjmHpgpmE8BAUww5c+wNWPHce4uwtlFZ/O9KqT01FJJeFq0b0 YlTunU/NxBdYiZbjzXdr1b+6Fdn6Z61QhcDthtX+OY7IN1dlKZDo5BhFWWIL5beI+JwR +zKNfRQnA9SMJVYJI/nRAD0OHkBRcbgJIL5Ig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:subject:from:to:cc:date:message-id :mime-version:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; b=p8UqsEYCHQQWimlRqsEy54Xu0oU6NdbU66f1MgZuDleGUqVfozGUAcNfb/N/hCgzJh dANWJySyp5gUYZvb6gLhEvTNPqv91XxpumzpIMoUXdrd98WZ/+f/1O7FwlWADkXiI9yL N4fOhqeuOjmqxcr9rjTf33whz0Jv+VwVG4tTE= Received: by 10.115.66.26 with SMTP id t26mr567947wak.3.1284891740271; Sun, 19 Sep 2010 03:22:20 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.115.67.12 with SMTP id u12ls5091281wak.3.p; Sun, 19 Sep 2010 03:22:20 -0700 (PDT) Received: by 10.114.77.13 with SMTP id z13mr1642476waa.11.1284891739969; Sun, 19 Sep 2010 03:22:19 -0700 (PDT) Received: by 10.114.77.13 with SMTP id z13mr1642475waa.11.1284891739932; Sun, 19 Sep 2010 03:22:19 -0700 (PDT) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.212.180]) by gmr-mx.google.com with ESMTP id j18si7735253wan.1.2010.09.19.03.22.18; Sun, 19 Sep 2010 03:22:18 -0700 (PDT) Received-SPF: pass (google.com: domain of axel.lin@gmail.com designates 209.85.212.180 as permitted sender) client-ip=209.85.212.180; Received: by pxi7 with SMTP id 7so974902pxi.39 for ; Sun, 19 Sep 2010 03:22:18 -0700 (PDT) Received: by 10.115.18.12 with SMTP id v12mr8351884wai.114.1284891735385; Sun, 19 Sep 2010 03:22:15 -0700 (PDT) Received: from [59.117.65.39] (59-117-65-39.dynamic.hinet.net [59.117.65.39]) by mx.google.com with ESMTPS id c24sm10930697wam.7.2010.09.19.03.22.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 19 Sep 2010 03:22:13 -0700 (PDT) Subject: [rtc-linux] [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe() From: Axel Lin To: linux-kernel Cc: Alessandro Zummo , Mattias Wallin , Linus Walleij , rtc-linux@googlegroups.com Date: Sun, 19 Sep 2010 18:22:06 +0800 Message-ID: <1284891726.2199.3.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-Original-Sender: axel.lin@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of axel.lin@gmail.com designates 209.85.212.180 as permitted sender) smtp.mail=axel.lin@gmail.com; dkim=pass (test mode) header.i=@gmail.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Otherwise, calling platform_get_drvdata() in ab3100_rtc_remove() return NULL. Signed-off-by: Axel Lin Acked-by:Wan ZongShun Acked-by: Linus Walleij --- drivers/rtc/rtc-ab3100.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c index d26780e..261a07e 100644 --- a/drivers/rtc/rtc-ab3100.c +++ b/drivers/rtc/rtc-ab3100.c @@ -235,6 +235,7 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev) err = PTR_ERR(rtc); return err; } + platform_set_drvdata(pdev, rtc); return 0; } @@ -244,6 +245,7 @@ static int __exit ab3100_rtc_remove(struct platform_device *pdev) struct rtc_device *rtc = platform_get_drvdata(pdev); rtc_device_unregister(rtc); + platform_set_drvdata(pdev, NULL); return 0; }