simplify code
Cc: Chiwoong Byun <woong.byun@samsung.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Jonghwa Lee <jonghwa3.lee@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Myugnjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
enum MAX77686_RTC_OP op)
{
int ret;
- unsigned int data = 0;
+ unsigned int data;
- switch (op) {
- case MAX77686_RTC_WRITE:
+ if (op == MAX77686_RTC_WRITE)
data = 1 << RTC_UDR_SHIFT;
- break;
- case MAX77686_RTC_READ:
+ else
data = 1 << RTC_RBUDR_SHIFT;
- break;
- }
ret = regmap_update_bits(info->max77686->rtc_regmap,
MAX77686_RTC_UPDATE0, data, data);