[PATCH 02/12] i2c: pxa: No need to set slave addr for i2c master mode reset
Robert Jarzmik
robert.jarzmik at free.fr
Fri May 29 12:21:01 PDT 2015
Vaibhav Hiremath <vaibhav.hiremath at linaro.org> writes:
> diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
> index f4ac8c5..d4c798a 100644
> --- a/drivers/i2c/busses/i2c-pxa.c
> +++ b/drivers/i2c/busses/i2c-pxa.c
> @@ -459,8 +459,10 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c)
> writel(I2C_ISR_INIT, _ISR(i2c));
> writel(readl(_ICR(i2c)) & ~ICR_UR, _ICR(i2c));
>
> +#ifdef CONFIG_I2C_PXA_SLAVE
> if (i2c->reg_isar)
> writel(i2c->slave_addr, _ISAR(i2c));
> +#endif
I'd rather have :
if (i2c->reg_isar && IS_ENABLED(CONFIG_I2C_PXA_SLAVE))
writel(i2c->slave_addr, _ISAR(i2c));
Cheers.
--
Robert
More information about the linux-arm-kernel
mailing list