Re: [PATCH] gpio: sx150x: fix error code value

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

 



  	err = sx150x_i2c_read(chip->client, reg,&data);
  	if (err>= 0)
-		err = (data&  mask) != 0 ? 1 : 0;
+		err = (data&  mask) != 0 ? -EIO : 0;


This doesn't work. The IO pins are gpio data pins, which are used as 0 or 1 data values (see sx150x_gpio_get). Returning -EIO whenever an attempt is made to gpio_get_value on a non-zero gpio line will break things.

--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux