1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/saul_reg: remove deprecated saul_reg_rm

This commit is contained in:
Alexandre Abadie 2022-01-08 11:48:44 +01:00
parent c5656ef3b2
commit 08f93d7904
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 0 additions and 43 deletions

View File

@ -69,26 +69,6 @@ extern saul_reg_t *saul_reg;
*/
int saul_reg_add(saul_reg_t *dev);
/**
* @brief Unregister a device from the SAUL registry
*
* @warning Removing the device at runtime can send applications that have
* looked up that device into invalid states, and should thus be
* avoided.
*
* @warning This function must only be used by drivers that advise developers
* using them on how to prevent race conditions when using SAUL.
*
* @deprecated This function will be removed soon as it is practically unusable
* for the above reasons.
*
* @param[in] dev pointer to a registry entry
*
* @return 0 on success
* @return -ENODEV if device was not found in the registry
*/
int saul_reg_rm(saul_reg_t *dev);
/**
* @brief Find a device by its position in the registry
*

View File

@ -53,29 +53,6 @@ int saul_reg_add(saul_reg_t *dev)
return 0;
}
int saul_reg_rm(saul_reg_t *dev)
{
saul_reg_t *tmp = saul_reg;
if (saul_reg == NULL || dev == NULL) {
return -ENODEV;
}
if (saul_reg == dev) {
saul_reg = dev->next;
return 0;
}
while (tmp->next && (tmp->next != dev)) {
tmp = tmp->next;
}
if (tmp->next == dev) {
tmp->next = dev->next;
}
else {
return -ENODEV;
}
return 0;
}
saul_reg_t *saul_reg_find_nth(int pos)
{
saul_reg_t *tmp = saul_reg;