/* pnp_remove_card - removes a PnP card from the PnP Layer @card: pointer to the card to remove  */
void pnp_remove_card(struct pnp_card *card)
/* pnp_remove_card - removes a PnP card from the PnP Layer @card: pointer to the card to remove  */
void pnp_remove_card(struct pnp_card *card)
{
	struct list_head *pos, *temp;
	device_unregister(&card->dev);
	spin_lock(&pnp_lock);
	list_del(&card->global_list);
	list_del(&card->protocol_list);
	spin_unlock(&pnp_lock);
	list_for_each_safe(pos, temp, &card->devices) {
		struct pnp_dev *dev = card_to_pnp_dev(pos);
		pnp_remove_card_device(dev);
	}
}