Lines Matching defs:nm
234 struct gpio_name *nm;
257 nm = kmem_alloc(sizeof(*nm), KM_SLEEP);
258 strlcpy(nm->gp_name, defname, sizeof(nm->gp_name));
259 nm->gp_pin = pin;
260 LIST_INSERT_HEAD(&sc->sc_names, nm, gp_next);
707 struct gpio_name *nm;
709 LIST_FOREACH(nm, &sc->sc_names, gp_next)
710 if (!strcmp(nm->gp_name, gp_name))
711 return nm->gp_pin;
741 struct gpio_name *nm;
782 LIST_FOREACH(nm, &sc->sc_names, gp_next)
783 if (nm->gp_pin == pin) {
784 strlcpy(req->gp_name, nm->gp_name, GPIOMAXNAME);
964 LIST_FOREACH(nm, &sc->sc_names, gp_next) {
965 if (!strcmp(nm->gp_name, set->gp_name2) &&
966 nm->gp_pin != pin)
968 if (nm->gp_pin == pin)
969 gnm = nm;
975 nm = kmem_alloc(sizeof(struct gpio_name),
977 strlcpy(nm->gp_name, set->gp_name2,
978 sizeof(nm->gp_name));
979 nm->gp_pin = set->gp_pin;
980 LIST_INSERT_HEAD(&sc->sc_names, nm, gp_next);
1002 LIST_FOREACH(nm, &sc->sc_names, gp_next) {
1003 if (nm->gp_pin == pin) {
1004 LIST_REMOVE(nm, gp_next);
1005 kmem_free(nm, sizeof(struct gpio_name));