X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=hellochar.c;h=7f659f5816545cbae7799cdbd36718dc1b4628fc;hb=refs%2Fheads%2Ftime;hp=a197a1d31e1396f603eebf0cf45f416d92135769;hpb=014bb573eed1a3f9c907a4ae6186834e98dbb85c;p=cascardo%2Fkernel%2Fsamples%2Fchar2%2F.git diff --git a/hellochar.c b/hellochar.c index a197a1d..7f659f5 100644 --- a/hellochar.c +++ b/hellochar.c @@ -39,9 +39,9 @@ static int hello_open(struct inode *ino, struct file *fp) static ssize_t hello_read(struct file *fp, char __user *buf, size_t sz, loff_t *pos) { - unsigned long expire = jiffies + 5 * HZ; - while (time_after(expire, jiffies)) - cpu_relax(); + int i = 1 << 20; + while (i--) + udelay(10); return 0; }