samples: lwm2m_client: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we work on phasing out use of DTS 'label' property. Signed-off-by: Kumar Gala <galak@kernel.org>
This commit is contained in:
parent
9ceeb3a0ae
commit
c4cdba3833
1 changed files with 6 additions and 1 deletions
|
@ -188,7 +188,12 @@ static void *temperature_get_buf(uint16_t obj_inst_id, uint16_t res_id,
|
|||
const struct device *dev = NULL;
|
||||
|
||||
#if defined(CONFIG_FXOS8700_TEMP)
|
||||
dev = device_get_binding(DT_LABEL(DT_INST(0, nxp_fxos8700)));
|
||||
dev = DEVICE_DT_GET_ONE(nxp_fxos8700);
|
||||
|
||||
if (!device_is_ready(dev)) {
|
||||
LOG_ERR("%s: device not ready.", dev->name);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dev != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue