Skip to content
Commit a20cd88e authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Linus Torvalds
Browse files

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: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ea33c31b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment