/* adds to driver model, name database, fixups, interface, etc.  */
int pnp_add_device(struct pnp_dev *dev)
/* adds to driver model, name database, fixups, interface, etc.  */
int pnp_add_device(struct pnp_dev *dev)
{
	int ret;
	char buf[128];
	int len = 0;
	struct pnp_id *id;
	if (dev->card)
		return -EINVAL;
	ret = __pnp_add_device(dev);
	if (ret)
		return ret;
	buf[0] = '\0';
	for (id = dev->id; id; id = id->next)
		len += scnprintf(buf + len, sizeof(buf) - len, " %s", id->id);
	pnp_dbg(&dev->dev, "%s device, IDs%s (%s)\n",
		dev->protocol->name, buf, dev->active ? "active" : "disabled");
	return 0;
}