Thread (12 messages) 12 messages, 2 authors, 2011-12-12

Re: [PATCH v5 5/9] ARM: versatile: Map local timers using Device Tree when possible

From: Pawel Moll <hidden>
Date: 2011-12-12 11:03:31
Also in: linux-arm-kernel

Morning,

On Sat, 2011-12-10 at 15:27 +0000, Sergei Shtylyov wrote:
quoted
  int __cpuinit local_timer_setup(struct clock_event_device *evt)
  {
+#if defined(CONFIG_OF)
+	if (!twd_base) {
+		struct device_node *np = of_find_compatible_node(NULL,
+				NULL, "arm,smp-twd");
+
+		twd_base = of_iomap(np, 0);
+		if (!twd_base)
+			return -ENXIO;
    -ENOMEM.
Hm. What I did simply mimics this ("arch/arm/include/asm/localtimer.h"):

#ifdef CONFIG_LOCAL_TIMERS
[...]
#else

static inline int local_timer_setup(struct clock_event_device *evt)
{
        return -ENXIO;
}

Now, I had a look at "include/asm-generic/errno-base.h":

#define ENXIO            6      /* No such device or address */
[...]
#define ENOMEM          12      /* Out of memory */

and to be honest, ENXIO makes more sense to me, but I really have no
strong feelings either way... Do you?

Thanks for your time!

Paweł



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help