rtc: max77686: Use ffs() to calculate tm_wday
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Mon, 13 Oct 2014 22:53:03 +0000 (15:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Oct 2014 00:18:19 +0000 (02:18 +0200)
commita20cd88e20e59ce11ebca84fac769654193c51e0
tree608d6eece0c3e67550438a7b8a57b74ee41c519e
parentea33c31b621e296356ab74ea0237ba7761f2287e
rtc: max77686: Use ffs() to calculate tm_wday

max77686_rtc_calculate_wday() is used to calculate the day of the week
to be filled in struct rtc_time but that function only calculates the
number of bits shifted.  So the ffs() function can be used to find the
first bit set instead of a special function.

[akpm@linux-foundation.org: add comment clarifying ffs() use]
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-max77686.c