Re: [PATCH 04/12] staging: iio: tsl2x7x: add common function for writing to the control register

2018-03-10 Thread Jonathan Cameron
On Sat, 3 Mar 2018 20:49:34 -0500 Brian Masney wrote: > There were four places where the same chunk of code was used to write > to the control register. This patch creates a common function > tsl2x7x_write_control_reg() to reduce duplicate code. > > The function tsl2x7x_chip_off() did not corre

[PATCH 04/12] staging: iio: tsl2x7x: add common function for writing to the control register

2018-03-03 Thread Brian Masney
There were four places where the same chunk of code was used to write to the control register. This patch creates a common function tsl2x7x_write_control_reg() to reduce duplicate code. The function tsl2x7x_chip_off() did not correctly return an error code so this patch also corrects that issue.