lkml.org 
[lkml]   [2020]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/2] iio: gyro: Add driver support for ADXRS290
From
Date

On 22/07/20 2:05 am, Nishant Malpani wrote:

[...]

>>> +                       return IIO_VAL_INT;
>>> +               default:
>>> +                       return -EINVAL;
>>> +               }
>>
>> ...
>>
>>> +               *vals = (const int *)adxrs290_lpf_3db_freq_tbl;
>>
>> Why casting?
>>
> adxrs290_lpf_3db_freq_tbl is of type (int *)[2], right? Without the
> casting, an incompatible-pointer-type error is thrown.

Sorry, the above is incorrect. adxrs290_lpf_3db_freq_tbl is a pointer to
an array of two ints.

[...]

Regards,
Nishant Malpani

\
 
 \ /
  Last update: 2020-07-21 23:14    [W:0.113 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site