From patchwork Thu Jan 22 09:55:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3558 X-Patchwork-Delegate: lethal@linux-sh.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0M9rBB2000634 for ; Thu, 22 Jan 2009 01:53:11 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755026AbZAVJ5t (ORCPT ); Thu, 22 Jan 2009 04:57:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755123AbZAVJ5s (ORCPT ); Thu, 22 Jan 2009 04:57:48 -0500 Received: from rv-out-0506.google.com ([209.85.198.224]:5621 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755026AbZAVJ5r (ORCPT ); Thu, 22 Jan 2009 04:57:47 -0500 Received: by rv-out-0506.google.com with SMTP id k40so4065474rvb.1 for ; Thu, 22 Jan 2009 01:57:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=64yQofq6N94bJPLGGcCV2jXRLUXuAwmm+sFChc0H/CI=; b=JfYrlorRFDDhul9gQZi3/dhmyxrQNwhC1E0RBmLSxV0KVVajLpS5kddoCHP2nJYfRt 8YmnN0cXJAv970kpyLMSSfDAb0n0E2AVjSP63Jaqm+qHFvrTJW7w0EUnIpLnDCj7sccN UoEvsBg+jJ4SoUcmRTkf6I6Fgd7M7Vq84FA1k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=Shz1wTEMF7LtQVDfr3t4WJi2FWVWWdO2GlAnFe4aRWe/GIRvHov0ZiGzFAqsfnN6OV m+hYllB6Povc8vfRFmJI/Op88ZXmEDK3jcnZj6qavoa66D/CHoV5Zq3VNtvFPVJawiqb aQ9ok26obnSui7qUwT2xzkJ9AP/r3/izZgijc= Received: by 10.141.43.19 with SMTP id v19mr3047036rvj.115.1232618267498; Thu, 22 Jan 2009 01:57:47 -0800 (PST) Received: from rx1.opensource.se (114.8.221.202.ts.2iij.net [202.221.8.114]) by mx.google.com with ESMTPS id l31sm18025851rvb.2.2009.01.22.01.57.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 22 Jan 2009 01:57:46 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: johnstul@us.ibm.com, Magnus Damm , lethal@linux-sh.org, tglx@linutronix.de, akpm@linux-foundation.org, mingo@redhat.com Date: Thu, 22 Jan 2009 18:55:49 +0900 Message-Id: <20090122095549.31653.60239.sendpatchset@rx1.opensource.se> In-Reply-To: <20090122095521.31653.35942.sendpatchset@rx1.opensource.se> References: <20090122095521.31653.35942.sendpatchset@rx1.opensource.se> Subject: [PATCH 03/05] sh: fix no sys_timer case Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm Handle the case with a sys_timer set to NULL. Signed-off-by: Magnus Damm --- arch/sh/kernel/time_32.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0015/arch/sh/kernel/time_32.c +++ work/arch/sh/kernel/time_32.c 2009-01-22 16:24:35.000000000 +0900 @@ -18,6 +18,7 @@ #include #include /* for rtc_lock */ #include +#include #include #include #include @@ -181,7 +182,12 @@ static struct sysdev_class timer_sysclas static int __init timer_init_sysfs(void) { - int ret = sysdev_class_register(&timer_sysclass); + int ret; + + if (!sys_timer) + return 0; + + ret = sysdev_class_register(&timer_sysclass); if (ret != 0) return ret; @@ -230,5 +236,8 @@ void __init time_init(void) * initialized for us. */ sys_timer = get_sys_timer(); - printk(KERN_INFO "Using %s for system timer\n", sys_timer->name); + if (sys_timer) + pr_info("Using %s for system timer\n", sys_timer->name); + else + pr_warning("System timer missing, boot will fail.\n"); }