From patchwork Wed Jul 22 05:34:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kjetil Oftedal X-Patchwork-Id: 30071 X-Patchwork-Delegate: davem@davemloft.net 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 38340B7334 for ; Wed, 22 Jul 2009 15:52:11 +1000 (EST) Received: by ozlabs.org (Postfix) id 232D4DDD04; Wed, 22 Jul 2009 15:52:11 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id B5714DDD01 for ; Wed, 22 Jul 2009 15:52:10 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751969AbZGVFvx (ORCPT ); Wed, 22 Jul 2009 01:51:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751957AbZGVFvw (ORCPT ); Wed, 22 Jul 2009 01:51:52 -0400 Received: from bene1.itea.ntnu.no ([129.241.56.56]:51049 "EHLO bene1.itea.ntnu.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751969AbZGVFvw (ORCPT ); Wed, 22 Jul 2009 01:51:52 -0400 Received: from localhost (localhost [127.0.0.1]) by bene1.itea.ntnu.no (Postfix) with ESMTP id 7AD8E16C890 for ; Wed, 22 Jul 2009 07:51:51 +0200 (CEST) Received: from m166j.studby.ntnu.no (m166j.studby.ntnu.no [129.241.137.166]) by bene1.itea.ntnu.no (Postfix) with ESMTP id 13A5016C72F for ; Wed, 22 Jul 2009 07:51:51 +0200 (CEST) Date: Wed, 22 Jul 2009 07:34:22 +0200 (CEST) From: Kjetil Oftedal X-X-Sender: kjetil@oizys.tordivel.org To: sparclinux@vger.kernel.org Subject: [PATCH v2] Fix multiple RTC detections on SUN4D In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Virus-Scanned: Debian amavisd-new at bene1.itea.ntnu.no Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org David Miller pointed out that the first version was poorly written. Have rewritten the patch with his suggestions in mind, and the code became a lot cleaner. --- To unsubscribe from this list: send the line "unsubscribe sparclinux" 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/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 614ac7b..a70da0a 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c @@ -156,6 +156,10 @@ static int __devinit clock_probe(struct of_device *op, const struct of_device_id if (!model) return -ENODEV; + /* Only the primary RTC has an address property */ + if (!of_find_property(dp, "address", NULL)) + return -ENODEV; + m48t59_rtc.resource = &op->resource[0]; if (!strcmp(model, "mk48t02")) { /* Map the clock register io area read-only */