diff mbox

[v2] Fix multiple RTC detections on SUN4D

Message ID Pine.LNX.4.64.0907220726370.11858@oizys.tordivel.org
State Changes Requested
Delegated to: David Miller
Headers show

Commit Message

Kjetil Oftedal July 22, 2009, 5:34 a.m. UTC
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

Comments

David Miller July 22, 2009, 6:07 a.m. UTC | #1
From: Kjetil Oftedal <oftedal@gmail.com>
Date: Wed, 22 Jul 2009 07:34:22 +0200 (CEST)

> 
> 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.

Please, when submitting new versions of your patch, resubmit the
full original changelog message and proper "Signed-off-by:" tags.

I can't apply this without all of that information properly provided.
--
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 mbox

Patch

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 */