提交 db210426 编写于 作者: T Thierry MERLE 提交者: Mauro Carvalho Chehab

V4L/DVB (8876): budget: udelay changed to mdelay

budget.ko fails to build on ARM with:

ERROR: "__bad_udelay" [drivers/media/dvb/ttpci/budget.ko] undefined!
make[1]: *** [__modpost] Error 1

__bad_udelay is specifically designed on ARM to fail when udelay is
called in a bad way.  arch/arm/include/asm/delay.h has this to say
about __bad_udelay:

/*
 * This function intentionally does not exist; if you see references to
 * it, it means that you're calling udelay() with an out of range value.
 *
 * With currently imposed limits, this means that we support a max delay
 * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
 */
extern void __bad_udelay(void);

Solution is to replace udelay by a mdelay and udelay with value less than 2000
Acked-by: NOliver Endriss <o.endriss@gmx.de>
Signed-off-by: NThierry MERLE <thierry.merle@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 db0a2901
...@@ -116,7 +116,8 @@ static int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long ...@@ -116,7 +116,8 @@ static int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long
DiseqcSendByte(budget, 0xff); DiseqcSendByte(budget, 0xff);
else { else {
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI);
udelay(12500); mdelay(12);
udelay(500);
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO);
} }
msleep(20); msleep(20);
......
...@@ -108,7 +108,8 @@ static int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long ...@@ -108,7 +108,8 @@ static int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long
DiseqcSendByte(budget, 0xff); DiseqcSendByte(budget, 0xff);
else { else {
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI);
udelay(12500); mdelay(12);
udelay(500);
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO);
} }
msleep(20); msleep(20);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册