1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

Merge pull request #7723 from haukepetersen/fix_saulreg_devptr

saul_reg: make ptr to device descriptor non const
This commit is contained in:
Vincent Dupont 2017-10-12 12:06:10 +02:00 committed by GitHub
commit b3ebdab80a
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ void auto_init_gpio(void)
LOG_DEBUG("[auto_init_saul] initializing GPIO #%u\n", i);
saul_reg_entries[i].dev = p;
saul_reg_entries[i].dev = (void *)p;
saul_reg_entries[i].name = p->name;
if ((p->mode == GPIO_IN) || (p->mode == GPIO_IN_PD) ||
(p->mode == GPIO_IN_PU)) {

View File

@ -38,7 +38,7 @@ extern "C" {
*/
typedef struct saul_reg {
struct saul_reg *next; /**< pointer to the next device */
const void *dev; /**< pointer to the device descriptor */
void *dev; /**< pointer to the device descriptor */
const char *name; /**< string identifier for the device */
saul_driver_t const *driver; /**< the devices read callback */
} saul_reg_t;