Lines Matching refs:protocol
3 * core.c - contains all core device and protocol registration functions
46 static void pnp_remove_protocol(struct pnp_protocol *protocol)
49 list_del(&protocol->protocol_list);
54 * pnp_register_protocol - adds a pnp protocol to the pnp layer
55 * @protocol: pointer to the corresponding pnp_protocol structure
59 int pnp_register_protocol(struct pnp_protocol *protocol)
64 INIT_LIST_HEAD(&protocol->devices);
65 INIT_LIST_HEAD(&protocol->cards);
79 protocol->number = nodenum;
80 dev_set_name(&protocol->dev, "pnp%d", nodenum);
82 list_add_tail(&protocol->protocol_list, &pnp_protocols);
86 ret = device_register(&protocol->dev);
88 pnp_remove_protocol(protocol);
94 * pnp_unregister_protocol - removes a pnp protocol from the pnp layer
95 * @protocol: pointer to the corresponding pnp_protocol structure
97 void pnp_unregister_protocol(struct pnp_protocol *protocol)
99 pnp_remove_protocol(protocol);
100 device_unregister(&protocol->dev);
141 struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id,
153 dev->protocol = protocol;
157 dev->dev.parent = &dev->protocol->dev;
169 dev_set_name(&dev->dev, "%02x:%02x", dev->protocol->number, dev->number);
192 list_add_tail(&dev->protocol_list, &dev->protocol->devices);
199 else if (dev->protocol->can_wakeup)
201 dev->protocol->can_wakeup(dev));
231 dev->protocol->name, buf,