Root/lib/reciprocal_div.c

Source at commit b386be689295730688885552666ea40b2e639b14 created 8 years 11 months ago.
By Maarten ter Huurne, Revert "MIPS: JZ4740: reset: Initialize hibernate wakeup counters."
1#include <asm/div64.h>
2#include <linux/reciprocal_div.h>
3#include <linux/export.h>
4
5u32 reciprocal_value(u32 k)
6{
7    u64 val = (1LL << 32) + (k - 1);
8    do_div(val, k);
9    return (u32)val;
10}
11EXPORT_SYMBOL(reciprocal_value);
12

Archive Download this file



interactive