Re: [PATCH v2 2/2] i2c: core: ACPI: Make acpi_gsb_i2c_read_bytes() check i2c_transfer return value

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

 



On Sun, Aug 12, 2018 at 12:53:21PM +0200, Hans de Goede wrote:
> Currently acpi_gsb_i2c_read_bytes() directly returns i2c_transfer's return
> value. i2c_transfer returns a value < 0 on error and 2 (for 2 successfully
> executed transfers) on success. But the ACPI code expects 0 on success, so
> currently acpi_gsb_i2c_read_bytes()'s caller does:
> 
>         if (status > 0)
>                 status = 0;
> 
> This commit makes acpi_gsb_i2c_read_bytes() return a value which can be
> directly consumed by the ACPI code, mirroring acpi_gsb_i2c_write_bytes(),
> this commit also makes acpi_gsb_i2c_read_bytes() explitcly check that
> i2c_transfer returns 2, rather then accepting any value > 0.
> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>

Applied to for-next, thanks!

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux