Skip to content

Commit

Permalink
ASoC: pcm512x: use DIV_ROUND_CLOSEST_ULL() from kernel.h
Browse files Browse the repository at this point in the history
Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal
implementation and use the kernel one.

Signed-off-by: Javi Merino <[email protected]>
Reported-by: kbuild test robot <[email protected]>
Cc: Peter Rosin <[email protected]>
Acked-by: Mark Brown <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Javi Merino authored and torvalds committed Apr 17, 2015
1 parent 512eb72 commit d48502e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/codecs/pcm512x.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/kernel.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
Expand All @@ -31,8 +32,6 @@

#define DIV_ROUND_DOWN_ULL(ll, d) \
({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; })
#define DIV_ROUND_CLOSEST_ULL(ll, d) \
({ unsigned long long _tmp = (ll)+(d)/2; do_div(_tmp, d); _tmp; })

#define PCM512x_NUM_SUPPLIES 3
static const char * const pcm512x_supply_names[PCM512x_NUM_SUPPLIES] = {
Expand Down

0 comments on commit d48502e

Please sign in to comment.