diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-06-17 14:10:42 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-06-19 22:22:28 +0200 |
commit | bd25c57feccb6b6dc19f8c5c4ae60de599a6a736 (patch) | |
tree | 1bde6e3efba6b6b0fbdb9dd34732b4ea800b6993 | |
parent | 20fd34af7bcfa4b888bfb12c8037c7f52f664e3c (diff) |
backprots: add rounddown
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | backport/backport-include/linux/kernel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/backport/backport-include/linux/kernel.h b/backport/backport-include/linux/kernel.h index 79ad8896..42aa91dd 100644 --- a/backport/backport-include/linux/kernel.h +++ b/backport/backport-include/linux/kernel.h @@ -271,6 +271,15 @@ int hex_to_bin(char ch); __val > __max ? __max: __val; }) #endif +#ifndef rounddown +#define rounddown(x, y) ( \ +{ \ + typeof(x) __x = (x); \ + __x - (__x % (y)); \ +} \ +) +#endif /* rounddown */ + #endif /* __BACKPORT_KERNEL_H */ /* |