/* pnp_add_card_device - adds a device to the specified card @card: pointer to the card to add to @dev: pointer to the device to add  */
int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev)
/* pnp_add_card_device - adds a device to the specified card @card: pointer to the card to add to @dev: pointer to the device to add  */
int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev)
{
	dev->dev.parent = &card->dev;
	dev->card_link = NULL;
	dev_set_name(&dev->dev, "%02x:%02x.%02x",
		     dev->protocol->number, card->number, dev->number);
	spin_lock(&pnp_lock);
	dev->card = card;
	list_add_tail(&dev->card_list, &card->devices);
	spin_unlock(&pnp_lock);
	return 0;
}