diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-09-14 20:26:05 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-09-14 20:26:05 +0200 |
commit | ac8d513a6801c8636922ccf4f30211810c9a56ce (patch) | |
tree | 83ba584487a6a612c8fcf2563c28c0263df35ba2 /drivers/atm/horizon.c | |
parent | bf992fa2bc1ad1bb2aeb0bdfadb43f236b9297fd (diff) | |
parent | 99bc47067910f7070e65ee318a6dd79a2371f1e5 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/atm/horizon.c')
-rw-r--r-- | drivers/atm/horizon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 6b969f8c684..01ce241dbea 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c @@ -641,7 +641,7 @@ static int make_rate (const hrz_dev * dev, u32 c, rounding r, pre = 1; break; case round_nearest: - pre = (br+(c<<div)/2)/(c<<div); + pre = DIV_ROUND_CLOSEST(br, c<<div); // but p must be non-zero if (!pre) pre = 1; @@ -671,7 +671,7 @@ static int make_rate (const hrz_dev * dev, u32 c, rounding r, pre = DIV_ROUND_UP(br, c<<div); break; case round_nearest: - pre = (br+(c<<div)/2)/(c<<div); + pre = DIV_ROUND_CLOSEST(br, c<<div); break; default: /* round_up */ pre = br/(c<<div); |