mfd: wm8400-core: Delete wm8400_reg_read()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 15 Apr 2016 14:44:18 +0000 (17:44 +0300)
committerLee Jones <lee.jones@linaro.org>
Mon, 9 May 2016 07:20:45 +0000 (08:20 +0100)
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>
drivers/mfd/wm8400-core.c
include/linux/mfd/wm8400-private.h

index 9fd823049f90464f6a7dee8e10c1c00b8c5341c3..81667762c3ad151417b3e8498203d67fb552024b 100644 (file)
@@ -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)
 {
        return regmap_bulk_read(wm8400->regmap, reg, data, count);
index 2de565b94d0c39e9c0e3b049bbcf0237cceddb8f..4ee908f5b8348b6c2257c4b3689a2b97a3f58c41 100644 (file)
@@ -923,7 +923,6 @@ struct wm8400 {
 #define WM8400_LINE_CMP_VTHD_SHIFT                   0  /* 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);
 
 static inline int wm8400_set_bits(struct wm8400 *wm8400, u8 reg,