Search Linux Wireless

Re: [PATCH] rtlwifi: rtl8192de/phy.c: fix udelay() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/30/2011 04:33 PM, Andrew Morton wrote:
Also, there are eleventy billion instances of

	for (j = 0; j<  N; j++)
		udelay(MAX_STALL_TIME);

which seem rather unnecessary.

static inline void rtl8192c_udelay(unsigned n)
{
	if (n<  1000)
		udelay(n);
	else
		mdelay(n / 1000);
}

or something.

As MAX_STALL_TIME is 50, I have done the math for (N * 50) / 1000 and changed the loop to the equivalent mdelay call.

Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux