Re: [PATCH v3 2/2] iio: light: add support for veml3235

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

 



On 26/10/2024 20:10, Jonathan Cameron wrote:
> Hi Javier,
> 
>>>    222	
>>>    223		return 0;
>>>    224	}
>>>    225	
>>>   
>>
>>
>> Unused as there is no processed values anymore. I will drop them for v4.
> Given I didn't have any other comments I just fixed these up whilst applying.
> 
> Series applied to the togreg branch of iio.git and initially pushed out as
> testing for 0-day to take a first look at it.
> Thanks,
> 
> Jonathan
> 
> p.s. Diff was as follows, shout if I mess it up.
> 
> diff --git a/drivers/iio/light/veml3235.c b/drivers/iio/light/veml3235.c
> index 18ab73f4377c..66361c3012a3 100644
> --- a/drivers/iio/light/veml3235.c
> +++ b/drivers/iio/light/veml3235.c
> @@ -145,7 +145,7 @@ static int veml3235_get_it(struct veml3235_data *data, int *val, int *val2)
>  static int veml3235_set_it(struct iio_dev *indio_dev, int val, int val2)
>  {
>         struct veml3235_data *data = iio_priv(indio_dev);
> -       int ret, new_it, it_idx;
> +       int ret, new_it;
>  
>         if (val)
>                 return -EINVAL;
> @@ -153,23 +153,18 @@ static int veml3235_set_it(struct iio_dev *indio_dev, int val, int val2)
>         switch (val2) {
>         case 50000:
>                 new_it = 0x00;
> -               it_idx = 4;
>                 break;
>         case 100000:
>                 new_it = 0x01;
> -               it_idx = 3;
>                 break;
>         case 200000:
>                 new_it = 0x02;
> -               it_idx = 2;
>                 break;
>         case 400000:
>                 new_it = 0x03;
> -               it_idx = 1;
>                 break;
>         case 800000:
>                 new_it = 0x04;
> -               it_idx = 0;
>                 break;
>         default:
>                 return -EINVAL;
> @@ -188,7 +183,7 @@ static int veml3235_set_it(struct iio_dev *indio_dev, int val, int val2)
>  static int veml3235_set_gain(struct iio_dev *indio_dev, int val, int val2)
>  {
>         struct veml3235_data *data = iio_priv(indio_dev);
> -       int ret, new_gain, gain_idx;
> +       int ret, new_gain;
>  
>         if (val2 != 0)
>                 return -EINVAL;
> @@ -196,19 +191,15 @@ static int veml3235_set_gain(struct iio_dev *indio_dev, int val, int val2)
>         switch (val) {
>         case 1:
>                 new_gain = 0x00;
> -               gain_idx = 3;
>                 break;
>         case 2:
>                 new_gain = 0x01;
> -               gain_idx = 2;
>                 break;
>         case 4:
>                 new_gain = 0x03;
> -               gain_idx = 1;
>                 break;
>         case 8:
>                 new_gain = 0x07;
> -               gain_idx = 0;
>                 break;
>         default:
>                 return -EINVAL;
> 
> 
>>
> 


Hi Jonathan, that is exactly the diff I wanted to add for v4. Thanks for
fixing it.

Best regards,
Javier Carrasco




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux