Skip to content

Commit 71c4526

Browse files
maxd-nordicnashif
authored andcommitted
drivers: sensor: bmm150: Fix setting of attributes
Some functions in the bmm150 driver were depending on a define that was never used. Changed it to the one that is actually defined. Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
1 parent 7cda467 commit 71c4526

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/sensor/bosch/bmm150/bmm150.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int bmm150_set_odr(const struct device *dev, uint8_t val)
113113
return -ENOTSUP;
114114
}
115115

116-
#if defined(BMM150_SET_ATTR)
116+
#if defined(BMM150_SET_ATTR_REP)
117117
static int bmm150_read_rep_xy(const struct device *dev)
118118
{
119119
struct bmm150_data *data = dev->driver->data;
@@ -448,7 +448,7 @@ static inline int bmm150_attr_set_rep(const struct device *dev,
448448
}
449449
#endif
450450

451-
#if defined(BMM150_SET_ATTR)
451+
#if defined(BMM150_SET_ATTR_REP)
452452
static int bmm150_attr_set(const struct device *dev,
453453
enum sensor_channel chan,
454454
enum sensor_attribute attr,
@@ -490,7 +490,7 @@ static int bmm150_attr_set(const struct device *dev,
490490
#endif
491491

492492
static const struct sensor_driver_api bmm150_api_funcs = {
493-
#if defined(BMM150_SET_ATTR)
493+
#if defined(BMM150_SET_ATTR_REP)
494494
.attr_set = bmm150_attr_set,
495495
#endif
496496
.sample_fetch = bmm150_sample_fetch,

0 commit comments

Comments
 (0)