Skip to content

Commit 110e315

Browse files
ubiedahenrikbrixandersen
authored andcommitted
rm3100: decoder: fix missing const while edata buffer casting
To suppress compliance warnings. Signed-off-by: Luis Ubieda <[email protected]>
1 parent ff7a350 commit 110e315

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/sensor/pni/rm3100/rm3100_decoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int rm3100_decoder_get_frame_count(const uint8_t *buffer,
8787
struct sensor_chan_spec chan_spec,
8888
uint16_t *frame_count)
8989
{
90-
struct rm3100_encoded_data *edata = (struct rm3100_encoded_data *)buffer;
90+
const struct rm3100_encoded_data *edata = (const struct rm3100_encoded_data *)buffer;
9191

9292
if (chan_spec.chan_idx != 0) {
9393
return -ENOTSUP;
@@ -150,7 +150,7 @@ static int rm3100_decoder_decode(const uint8_t *buffer,
150150
uint16_t max_count,
151151
void *data_out)
152152
{
153-
struct rm3100_encoded_data *edata = (struct rm3100_encoded_data *)buffer;
153+
const struct rm3100_encoded_data *edata = (const struct rm3100_encoded_data *)buffer;
154154
uint8_t channel_request;
155155

156156
if (*fit != 0) {

0 commit comments

Comments
 (0)