diff options
author | Jean Delvare <khali@linux-fr.org> | 2012-09-01 19:53:57 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-18 17:22:58 +0200 |
commit | ed7dd240075fabf38e489930e39eab2dfa836520 (patch) | |
tree | a673bc772c7899466b6be8c39e61bcbe0058c287 /drivers/media/rc | |
parent | [media] rtl28xxu: correct usb_clear_halt() usage (diff) | |
download | linux-ed7dd240075fabf38e489930e39eab2dfa836520.tar.xz linux-ed7dd240075fabf38e489930e39eab2dfa836520.zip |
[media] mceusb: Optimize DIV_ROUND_CLOSEST call
DIV_ROUND_CLOSEST is faster if the compiler knows it will only be
dealing with unsigned dividends.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r-- | drivers/media/rc/mceusb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index a5c6c1c2af82..850547fe711c 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -627,7 +627,7 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf, break; case MCE_RSP_EQIRCFS: period = DIV_ROUND_CLOSEST( - (1 << data1 * 2) * (data2 + 1), 10); + (1U << data1 * 2) * (data2 + 1), 10); if (!period) break; carrier = (1000 * 1000) / period; |