Re: [PATCH v2 06/10] i2c: kempld: Use i2c_10bit_addr_*_from_msg() helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -132,10 +130,12 @@ static int kempld_i2c_process(struct kempld_i2c_data *i2c)
>  
>  	/* Second part of 10 bit addressing */
>  	if (i2c->state == STATE_ADDR10) {
> -		kempld_write8(pld, KEMPLD_I2C_DATA, i2c->msg->addr & 0xff);
> +		addr = i2c_10bit_addr_lo_from_msg(msg);
> +		i2c->state = STATE_START;

Any reason you moved this?

> +
> +		kempld_write8(pld, KEMPLD_I2C_DATA, addr);

Maybe we could skip using 'addr' here?

>  		kempld_write8(pld, KEMPLD_I2C_CMD, I2C_CMD_WRITE);
>  
> -		i2c->state = STATE_START;
>  		return 0;
>  	}

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux