Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hisax: remove bad udelay call to fix build error on ARM

The hisax ISDN driver fails to build on ARM with CONFIG_HISAX_ELSA:

| drivers/built-in.o: In function `modem_set_dial':
| drivers/isdn/hisax/elsa_ser.c:535: undefined reference to `__bad_udelay'
| drivers/isdn/hisax/elsa_ser.c:544: undefined reference to `__bad_udelay'
| drivers/built-in.o: In function `modem_set_init':
| drivers/isdn/hisax/elsa_ser.c:486: undefined reference to `__bad_udelay'
| [...]

According to the comment in arch/arm/include/asm/delay.h, __bad_udelay
is specifically designed on ARM to produce a build failure when udelay
is called with a value > 2000.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Martin Michlmayr and committed by
David S. Miller
cc05368c 23ca0c98

+11 -11
+11 -11
drivers/isdn/hisax/elsa_ser.c
··· 477 477 modem_set_init(struct IsdnCardState *cs) { 478 478 int timeout; 479 479 480 - #define RCV_DELAY 20000 480 + #define RCV_DELAY 20 481 481 modem_write_cmd(cs, MInit_1, strlen(MInit_1)); 482 482 timeout = 1000; 483 483 while(timeout-- && cs->hw.elsa.transcnt) 484 484 udelay(1000); 485 485 debugl1(cs, "msi tout=%d", timeout); 486 - udelay(RCV_DELAY); 486 + mdelay(RCV_DELAY); 487 487 modem_write_cmd(cs, MInit_2, strlen(MInit_2)); 488 488 timeout = 1000; 489 489 while(timeout-- && cs->hw.elsa.transcnt) 490 490 udelay(1000); 491 491 debugl1(cs, "msi tout=%d", timeout); 492 - udelay(RCV_DELAY); 492 + mdelay(RCV_DELAY); 493 493 modem_write_cmd(cs, MInit_3, strlen(MInit_3)); 494 494 timeout = 1000; 495 495 while(timeout-- && cs->hw.elsa.transcnt) 496 496 udelay(1000); 497 497 debugl1(cs, "msi tout=%d", timeout); 498 - udelay(RCV_DELAY); 498 + mdelay(RCV_DELAY); 499 499 modem_write_cmd(cs, MInit_4, strlen(MInit_4)); 500 500 timeout = 1000; 501 501 while(timeout-- && cs->hw.elsa.transcnt) 502 502 udelay(1000); 503 503 debugl1(cs, "msi tout=%d", timeout); 504 - udelay(RCV_DELAY ); 504 + mdelay(RCV_DELAY); 505 505 modem_write_cmd(cs, MInit_5, strlen(MInit_5)); 506 506 timeout = 1000; 507 507 while(timeout-- && cs->hw.elsa.transcnt) 508 508 udelay(1000); 509 509 debugl1(cs, "msi tout=%d", timeout); 510 - udelay(RCV_DELAY); 510 + mdelay(RCV_DELAY); 511 511 modem_write_cmd(cs, MInit_6, strlen(MInit_6)); 512 512 timeout = 1000; 513 513 while(timeout-- && cs->hw.elsa.transcnt) 514 514 udelay(1000); 515 515 debugl1(cs, "msi tout=%d", timeout); 516 - udelay(RCV_DELAY); 516 + mdelay(RCV_DELAY); 517 517 modem_write_cmd(cs, MInit_7, strlen(MInit_7)); 518 518 timeout = 1000; 519 519 while(timeout-- && cs->hw.elsa.transcnt) 520 520 udelay(1000); 521 521 debugl1(cs, "msi tout=%d", timeout); 522 - udelay(RCV_DELAY); 522 + mdelay(RCV_DELAY); 523 523 } 524 524 525 525 static void 526 526 modem_set_dial(struct IsdnCardState *cs, int outgoing) { 527 527 int timeout; 528 - #define RCV_DELAY 20000 528 + #define RCV_DELAY 20 529 529 530 530 modem_write_cmd(cs, MInit_speed28800, strlen(MInit_speed28800)); 531 531 timeout = 1000; 532 532 while(timeout-- && cs->hw.elsa.transcnt) 533 533 udelay(1000); 534 534 debugl1(cs, "msi tout=%d", timeout); 535 - udelay(RCV_DELAY); 535 + mdelay(RCV_DELAY); 536 536 if (outgoing) 537 537 modem_write_cmd(cs, MInit_dialout, strlen(MInit_dialout)); 538 538 else ··· 541 541 while(timeout-- && cs->hw.elsa.transcnt) 542 542 udelay(1000); 543 543 debugl1(cs, "msi tout=%d", timeout); 544 - udelay(RCV_DELAY); 544 + mdelay(RCV_DELAY); 545 545 } 546 546 547 547 static void