Rename ctlslot->mask to ctlslot->self to match the rest of the code

This commit is contained in:
Alexandre Ratchov 2020-12-03 11:35:37 +01:00
parent e891595ec7
commit 1e1589d70e
3 changed files with 7 additions and 7 deletions

View File

@ -2320,13 +2320,13 @@ ctlslot_new(struct dev *d, struct ctlops *ops, void *arg)
i++;
}
s->dev = d;
s->mask = 1 << i;
s->self = 1 << i;
if (!dev_ref(d))
return NULL;
s->ops = ops;
s->arg = arg;
for (c = d->ctl_list; c != NULL; c = c->next)
c->refs_mask |= s->mask;
c->refs_mask |= s->self;
return s;
}
@ -2340,7 +2340,7 @@ ctlslot_del(struct ctlslot *s)
pc = &s->dev->ctl_list;
while ((c = *pc) != NULL) {
c->refs_mask &= ~s->mask;
c->refs_mask &= ~s->self;
if (c->refs_mask == 0) {
*pc = c->next;
xfree(c);

View File

@ -149,7 +149,7 @@ struct ctlslot {
struct ctlops *ops;
void *arg;
struct dev *dev;
unsigned int mask;
unsigned int self; /* equal to (1 << index) */
unsigned int mode;
};

View File

@ -1252,7 +1252,7 @@ sock_execmsg(struct sock *f)
}
if (m->u.ctlsub.desc) {
if (!(f->ctlops & SOCK_CTLDESC)) {
ctl = f->ctlslot->mask;
ctl = f->ctlslot->self;
c = f->ctlslot->dev->ctl_list;
while (c != NULL) {
c->desc_mask |= ctl;
@ -1539,7 +1539,7 @@ sock_buildmsg(struct sock *f)
*/
if (f->ctlslot && (f->ctlops & SOCK_CTLDESC)) {
desc = f->ctldesc;
mask = f->ctlslot->mask;
mask = f->ctlslot->self;
size = 0;
pc = &f->ctlslot->dev->ctl_list;
while ((c = *pc) != NULL) {
@ -1597,7 +1597,7 @@ sock_buildmsg(struct sock *f)
}
}
if (f->ctlslot && (f->ctlops & SOCK_CTLVAL)) {
mask = f->ctlslot->mask;
mask = f->ctlslot->self;
for (c = f->ctlslot->dev->ctl_list; c != NULL; c = c->next) {
if ((c->val_mask & mask) == 0)
continue;