From patchwork Thu Aug 27 08:45:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 32227 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 9FD1DB7088 for ; Thu, 27 Aug 2009 18:45:48 +1000 (EST) Received: by ozlabs.org (Postfix) id 8D8B4DDD0B; Thu, 27 Aug 2009 18:45:48 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bilbo.ozlabs.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 88B09DDD04 for ; Thu, 27 Aug 2009 18:45:48 +1000 (EST) Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 11C13B7E11 for ; Thu, 27 Aug 2009 18:45:33 +1000 (EST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 573B9B7088 for ; Thu, 27 Aug 2009 18:45:26 +1000 (EST) Received: by ozlabs.org (Postfix) id 445C0DDD0B; Thu, 27 Aug 2009 18:45:26 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from pophost.sonytel.be (vervifontaine.sonytel.be [80.88.33.193]) by ozlabs.org (Postfix) with ESMTP id 998DFDDD04 for ; Thu, 27 Aug 2009 18:45:25 +1000 (EST) Received: from vixen.sonytel.be (piraat.sonytel.be [43.221.60.197]) by pophost.sonytel.be (Postfix) with ESMTP id DE46344483; Thu, 27 Aug 2009 10:45:22 +0200 (CEST) Date: Thu, 27 Aug 2009 10:45:22 +0200 (CEST) From: Geert Uytterhoeven To: stable@kernel.org Subject: powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration (fwd) Message-ID: User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Cc: Linux/PPC Development , Linux Kernel Development X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org For stable/linux-2.6.30.y ---------- Forwarded message ---------- Date: Thu, 27 Aug 2009 03:59:28 GMT From: Linux Kernel Mailing List To: git-commits-head@vger.kernel.org Subject: powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration Gitweb: http://git.kernel.org/linus/7b6a09f3d6aedeaac923824af2a5df30300b56e9 Commit: 7b6a09f3d6aedeaac923824af2a5df30300b56e9 Parent: f415c413f458837bd0c27086b79aca889f9435e4 Author: Geert Uytterhoeven AuthorDate: Sun Aug 23 22:54:32 2009 +0000 Committer: Benjamin Herrenschmidt CommitDate: Thu Aug 27 13:25:46 2009 +1000 powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration On non-PS3, we get: | kernel BUG at drivers/rtc/rtc-ps3.c:36! because the rtc-ps3 platform device is registered unconditionally in a kernel with builtin support for PS3. Reported-by: Sachin Sant Signed-off-by: Geert Uytterhoeven Acked-by: Geoff Levand Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/ps3/time.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c index b178a1e..40b5cb4 100644 --- a/arch/powerpc/platforms/ps3/time.c +++ b/arch/powerpc/platforms/ps3/time.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -84,6 +85,9 @@ static int __init ps3_rtc_init(void) { struct platform_device *pdev; + if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) + return -ENODEV; + pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0); if (IS_ERR(pdev)) return PTR_ERR(pdev);