提交 0e10d549 编写于 作者: D Dan Carpenter 提交者: Lee Jones

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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 f83c218c
...@@ -35,27 +35,6 @@ static bool wm8400_volatile(struct device *dev, unsigned int reg) ...@@ -35,27 +35,6 @@ static bool wm8400_volatile(struct device *dev, unsigned int reg)
} }
} }
/**
* wm8400_reg_read - Single register read
*
* @wm8400: Pointer to wm8400 control structure
* @reg: Register to read
*
* @return Read value
*/
u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg)
{
unsigned int val;
int ret;
ret = regmap_read(wm8400->regmap, reg, &val);
if (ret < 0)
return ret;
return val;
}
EXPORT_SYMBOL_GPL(wm8400_reg_read);
int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data) int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data)
{ {
return regmap_bulk_read(wm8400->regmap, reg, data, count); return regmap_bulk_read(wm8400->regmap, reg, data, count);
......
...@@ -923,7 +923,6 @@ struct wm8400 { ...@@ -923,7 +923,6 @@ struct wm8400 {
#define WM8400_LINE_CMP_VTHD_SHIFT 0 /* LINE_CMP_VTHD - [3:0] */ #define WM8400_LINE_CMP_VTHD_SHIFT 0 /* LINE_CMP_VTHD - [3:0] */
#define WM8400_LINE_CMP_VTHD_WIDTH 4 /* LINE_CMP_VTHD - [3:0] */ #define WM8400_LINE_CMP_VTHD_WIDTH 4 /* LINE_CMP_VTHD - [3:0] */
u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg);
int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data); int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data);
static inline int wm8400_set_bits(struct wm8400 *wm8400, u8 reg, static inline int wm8400_set_bits(struct wm8400 *wm8400, u8 reg,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册