From: Andrew Morton Date: Mon, 2 Oct 2006 09:17:38 +0000 (-0700) Subject: [PATCH] isdn: work around excessive udelay() X-Git-Tag: v2.6.19-rc1~451 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ca8af486765852302931bb69075871d5564e1e5b;p=linux-2.6-omap-h63xx.git [PATCH] isdn: work around excessive udelay() As reported in http://bugzilla.kernel.org/show_bug.cgi?id=6970, ISDN can issue excessively-long udelays, which triggers a build-time error on ARM. This is very sucky of ISDN, but I doubt if anyone is going to suddenly fix it. So change the macro to do the microsecond counting itself. Cc: Cc: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index 75920aa0a3c..2f9d5118cea 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h @@ -1316,7 +1316,18 @@ void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir); void iecpy(u_char * dest, u_char * iestart, int ieoffset); #endif /* __KERNEL__ */ -#define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);} +/* + * Busywait delay for `jiffs' jiffies + */ +#define HZDELAY(jiffs) do { \ + int tout = jiffs; \ + \ + while (tout--) { \ + int loops = USEC_PER_SEC / HZ; \ + while (loops--) \ + udelay(1); \ + } \ + } while (0) int ll_run(struct IsdnCardState *cs, int addfeatures); int CallcNew(void);