Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: wm8400-core: Delete wm8400_reg_read()

There was a static checker warning in wm8400_reg_read() because we were
returning u16 and that can't hold the negative error codes. The
function isn't used, so let's just delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Dan Carpenter and committed by
Lee Jones
0e10d549 f83c218c

-22
-21
drivers/mfd/wm8400-core.c
··· 35 35 } 36 36 } 37 37 38 - /** 39 - * wm8400_reg_read - Single register read 40 - * 41 - * @wm8400: Pointer to wm8400 control structure 42 - * @reg: Register to read 43 - * 44 - * @return Read value 45 - */ 46 - u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg) 47 - { 48 - unsigned int val; 49 - int ret; 50 - 51 - ret = regmap_read(wm8400->regmap, reg, &val); 52 - if (ret < 0) 53 - return ret; 54 - 55 - return val; 56 - } 57 - EXPORT_SYMBOL_GPL(wm8400_reg_read); 58 - 59 38 int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data) 60 39 { 61 40 return regmap_bulk_read(wm8400->regmap, reg, data, count);
-1
include/linux/mfd/wm8400-private.h
··· 923 923 #define WM8400_LINE_CMP_VTHD_SHIFT 0 /* LINE_CMP_VTHD - [3:0] */ 924 924 #define WM8400_LINE_CMP_VTHD_WIDTH 4 /* LINE_CMP_VTHD - [3:0] */ 925 925 926 - u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg); 927 926 int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data); 928 927 929 928 static inline int wm8400_set_bits(struct wm8400 *wm8400, u8 reg,