After previous refactoring, it is now possible to make lm75_write_config() a simple inline function. Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> --- drivers/hwmon/lm75.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index b8889392d5da..b03e760cf3a1 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -340,17 +340,11 @@ static inline long lm75_reg_to_mc(s16 temp, u8 resolution) return ((temp >> (16 - resolution)) * 1000) >> (resolution - 8); } -static int lm75_write_config(struct lm75_data *data, u16 set_mask, - u16 clr_mask) +static inline int lm75_write_config(struct lm75_data *data, u16 set_mask, + u16 clr_mask) { - int err; - - err = regmap_update_bits(data->regmap, LM75_REG_CONF, - clr_mask | LM75_SHUTDOWN, set_mask); - if (err) - return err; - - return 0; + return regmap_update_bits(data->regmap, LM75_REG_CONF, + clr_mask | LM75_SHUTDOWN, set_mask); } static irqreturn_t lm75_alarm_handler(int irq, void *private) -- 2.45.2