Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abe2f551 authored by Mylène Josserand's avatar Mylène Josserand Committed by Alexandre Belloni
Browse files

rtc: rv3029: Remove some checks and warnings



Remove some checks from checkpatch such as spaces around arithmetic
operations or prefer "unsigned int".

Signed-off-by: default avatarMylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent c2a1c145
Loading
Loading
Loading
Loading
+34 −34
Original line number Original line Diff line number Diff line
@@ -125,7 +125,7 @@ struct rv3029_data {
};
};


static int rv3029_read_regs(struct device *dev, u8 reg, u8 *buf,
static int rv3029_read_regs(struct device *dev, u8 reg, u8 *buf,
			    unsigned len)
			    unsigned int len)
{
{
	struct rv3029_data *rv3029 = dev_get_drvdata(dev);
	struct rv3029_data *rv3029 = dev_get_drvdata(dev);


@@ -137,7 +137,7 @@ static int rv3029_read_regs(struct device *dev, u8 reg, u8 *buf,
}
}


static int rv3029_write_regs(struct device *dev, u8 reg, u8 const buf[],
static int rv3029_write_regs(struct device *dev, u8 reg, u8 const buf[],
			     unsigned len)
			     unsigned int len)
{
{
	struct rv3029_data *rv3029 = dev_get_drvdata(dev);
	struct rv3029_data *rv3029 = dev_get_drvdata(dev);


@@ -515,6 +515,7 @@ static int rv3029_set_time(struct device *dev, struct rtc_time *tm)


	return 0;
	return 0;
}
}

static const struct rv3029_trickle_tab_elem {
static const struct rv3029_trickle_tab_elem {
	u32 r;		/* resistance in ohms */
	u32 r;		/* resistance in ohms */
	u8 conf;	/* trickle config bits */
	u8 conf;	/* trickle config bits */
@@ -603,10 +604,9 @@ static void rv3029_trickle_config(struct device *dev)
	err = rv3029_eeprom_update_bits(dev, RV3029_CONTROL_E2P_EECTRL,
	err = rv3029_eeprom_update_bits(dev, RV3029_CONTROL_E2P_EECTRL,
					RV3029_TRICKLE_MASK,
					RV3029_TRICKLE_MASK,
					trickle_set_bits);
					trickle_set_bits);
	if (err < 0) {
	if (err < 0)
		dev_err(dev, "Failed to update trickle charger config\n");
		dev_err(dev, "Failed to update trickle charger config\n");
}
}
}


#ifdef CONFIG_RTC_DRV_RV3029_HWMON
#ifdef CONFIG_RTC_DRV_RV3029_HWMON