From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 2/2] RTC: s3c: Initialize s3c_rtc_cpu_type before using it Date: Thu, 27 May 2010 14:52:59 -0700 Message-ID: <20100527145259.74101157.akpm@linux-foundation.org> References: <4BFEE40F.8010400@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:54769 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932535Ab0E0VxV (ORCPT ); Thu, 27 May 2010 17:53:21 -0400 In-Reply-To: <4BFEE40F.8010400@gmail.com> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: Maurus Cuelenaere Cc: rtc-linux@googlegroups.com, linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org, a.zummo@towertech.it, p_gortmaker@yahoo.com, Jiri.Pinkava@vscht.cz On Thu, 27 May 2010 23:28:47 +0200 Maurus Cuelenaere wrote: > Make sure s3c_rtc_cpu_type is initialised _before_ it's used in an if() check. > > This was probably caused due to a merge mistake. Nope, I went back to your original email: @@ -471,7 +509,12 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev) goto err_nortc; } - rtc->max_user_freq = 128; + if (s3c_rtc_cpu_type == TYPE_S3C64XX) + rtc->max_user_freq = 32768; + else + rtc->max_user_freq = 128; + + s3c_rtc_cpu_type = platform_get_device_id(pdev)->driver_data;