Patchwork [v2] Fix multiple RTC detections on SUN4D

login
register
mail settings
Submitter oftedal
Date July 22, 2009, 5:34 a.m.
Message ID <Pine.LNX.4.64.0907220726370.11858@oizys.tordivel.org>
Download mbox | patch
Permalink /patch/30071/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

oftedal - July 22, 2009, 5:34 a.m.
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
David Miller - July 22, 2009, 6:07 a.m.
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

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