including linux/delay.h vs asm/delay.h

Ruediger Oertel (ro@suse.de)
Wed, 28 Jun 2000 14:36:36 +0200 (MEST)


Let me try to re-post this to a broader audience...

Hi,

what is the intended difference between including
#include <asm/delay.h>
vs
#include <linux/delay.h>

Currently (2.2.17preX) this results in
... `loops_per_sec' undeclared (first use in this function)
since <asm/delay.h> includes <asm/smp.h> but this
defines loops_per_sec only for the SMP case, while
on x86, the file <asm/processor.h> defines it regardless of SMP.

Including <linux/delay.h> declares loops_per_sec as "extern unsigned long",
which would make these drivers compile.

A quick grep in drivers/*/*.c yields:
net/am79c961a.c:#include <asm/delay.h>
net/comx-hw-comx.c:#include <asm/delay.h>
net/seeq8005.c:#include <asm/delay.h>
sbus/dvma.c:#include <asm/delay.h>
scsi/seagate.c:#include <asm/delay.h>
video/clgenfb.c:#include <asm/delay.h>

-- 
with kind regards (mit freundlichem Grinsen),
                              Ruediger Oertel (ro@suse.de)
----------------------------------------------------------
          does "DONT PANIC" give a hint ?

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/