apps/examples/module: Some fixes

This commit is contained in:
Gregory Nutt 2015-12-12 11:49:34 -06:00
parent 6c14e176d9
commit ad4bcac7a0
2 changed files with 3 additions and 5 deletions

View File

@ -73,7 +73,7 @@ $(BIN): $(OBJS)
$(Q) $(LD) $(LDMODULEFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
clean:
$(call DMODULEILE, $(BIN))
$(call DELFILE, $(BIN))
$(call CLEAN)
install:

View File

@ -134,7 +134,7 @@ static int module_uninitialize(FAR void *arg)
/* TODO: Check if there are any open references to the driver */
syslog(LOG_INFO, "module_uninitialize: arg=%p\n", arg);
return register_driver("/dev/chardev", &chardev_fops, 0666, NULL);
return unregister_driver("/dev/chardev");
}
/****************************************************************************
@ -149,10 +149,8 @@ static int module_uninitialize(FAR void *arg)
*
****************************************************************************/
void module_initialize(mod_uninitializer_t *uninitializer, FAR void **arg)
int module_initialize(mod_uninitializer_t *uninitializer, FAR void **arg)
{
int ret;
syslog(LOG_INFO, "module_initialize:\n");
*uninitializer = module_uninitialize;