diff options
author | Dmitry Torokhov | 2015-04-07 08:46:23 -0700 |
---|---|---|
committer | Dmitry Torokhov | 2015-04-07 08:46:23 -0700 |
commit | 5f63e885ac32429fc1340f5a61e1484022efc773 (patch) | |
tree | f9a21a6902e1857274775b96d561d8be17287860 /lib/lcm.c | |
parent | b6d2d3289f84e9c7449dff04fb959e29207acd80 (diff) | |
parent | f22e6e847115abc3a0e2ad7bb18d243d42275af1 (diff) |
Merge tag 'v4.0-rc7' into next
Sync up with Linux 4.0-rc7 to bring in ALPS changes.
Diffstat (limited to 'lib/lcm.c')
-rw-r--r-- | lib/lcm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/lcm.c b/lib/lcm.c index e97dbd51e756..03d7fcb420b5 100644 --- a/lib/lcm.c +++ b/lib/lcm.c @@ -12,3 +12,14 @@ unsigned long lcm(unsigned long a, unsigned long b) return 0; } EXPORT_SYMBOL_GPL(lcm); + +unsigned long lcm_not_zero(unsigned long a, unsigned long b) +{ + unsigned long l = lcm(a, b); + + if (l) + return l; + + return (b ? : a); +} +EXPORT_SYMBOL_GPL(lcm_not_zero); |