#include "../include/finish.h"
#include "../include/setup.h"
-
+extern int next_minor;
/**
* msgobj_done - destroys one CAN message object
* @obj: pointer to CAN message object structure
}
if((obj->minor>=0)) {
- if(objects_p[obj->minor] == obj)
+ if(objects_p[obj->minor] == obj){
objects_p[obj->minor] = NULL;
+ if (--next_minor<0)
+ next_minor=0;
+ }
else
CANMSG("msgobj_done: not registered as minor\n");
}
int i;
struct candevice_t *candev;
- for(i=0; i<canhw->nr_boards; i++){
+ for(i=0; i<MAX_HW_CARDS; i++){
if((candev=canhw->candevice[i])==NULL)
continue;
candevice_done(candev);