mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 16:47:42 +00:00
PNP: Remove prehistoric deadcode
pnp_remove_card() is currently unused, it has been since it was added in 2003's BKrev: 3e6d3f19XSmESWEZnNEReEJOJW5SOw pnp_unregister_protocol() is currently unused, it has been since it was added in 2002's BKrev: 3df0cf6d4FVUKndhbfxjL7pksw5PGA Remove them, and pnp_remove_card_device() and __pnp_remove_device() which are now no longer used. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20250307214936.74504-1-linux@treblig.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
80e54e8491
commit
270247a209
@ -129,9 +129,6 @@ pnp_put_protocol
|
||||
pnp_register_protocol
|
||||
use this to register a new PnP protocol
|
||||
|
||||
pnp_unregister_protocol
|
||||
use this function to remove a PnP protocol from the Plug and Play Layer
|
||||
|
||||
pnp_register_driver
|
||||
adds a PnP driver to the Plug and Play Layer
|
||||
|
||||
|
@ -9,7 +9,6 @@ extern const struct attribute_group *pnp_dev_groups[];
|
||||
extern const struct bus_type pnp_bus_type;
|
||||
|
||||
int pnp_register_protocol(struct pnp_protocol *protocol);
|
||||
void pnp_unregister_protocol(struct pnp_protocol *protocol);
|
||||
|
||||
#define PNP_EISA_ID_MASK 0x7fffffff
|
||||
void pnp_eisa_id_to_string(u32 id, char *str);
|
||||
@ -21,9 +20,7 @@ int pnp_add_device(struct pnp_dev *dev);
|
||||
struct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id);
|
||||
|
||||
int pnp_add_card(struct pnp_card *card);
|
||||
void pnp_remove_card(struct pnp_card *card);
|
||||
int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev);
|
||||
void pnp_remove_card_device(struct pnp_dev *dev);
|
||||
|
||||
struct pnp_port {
|
||||
resource_size_t min; /* min base number */
|
||||
@ -138,7 +135,6 @@ void pnp_init_resources(struct pnp_dev *dev);
|
||||
void pnp_fixup_device(struct pnp_dev *dev);
|
||||
void pnp_free_options(struct pnp_dev *dev);
|
||||
int __pnp_add_device(struct pnp_dev *dev);
|
||||
void __pnp_remove_device(struct pnp_dev *dev);
|
||||
|
||||
int pnp_check_port(struct pnp_dev *dev, struct resource *res);
|
||||
int pnp_check_mem(struct pnp_dev *dev, struct resource *res);
|
||||
|
@ -269,25 +269,6 @@ int pnp_add_card(struct pnp_card *card)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
mutex_lock(&pnp_lock);
|
||||
list_del(&card->global_list);
|
||||
list_del(&card->protocol_list);
|
||||
mutex_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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* pnp_add_card_device - adds a device to the specified card
|
||||
* @card: pointer to the card to add to
|
||||
@ -306,19 +287,6 @@ int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* pnp_remove_card_device- removes a device from the specified card
|
||||
* @dev: pointer to the device to remove
|
||||
*/
|
||||
void pnp_remove_card_device(struct pnp_dev *dev)
|
||||
{
|
||||
mutex_lock(&pnp_lock);
|
||||
dev->card = NULL;
|
||||
list_del(&dev->card_list);
|
||||
mutex_unlock(&pnp_lock);
|
||||
__pnp_remove_device(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* pnp_request_card_device - Searches for a PnP device under the specified card
|
||||
* @clink: pointer to the card link, cannot be NULL
|
||||
|
@ -78,16 +78,6 @@ int pnp_register_protocol(struct pnp_protocol *protocol)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* pnp_unregister_protocol - removes a pnp protocol from the pnp layer
|
||||
* @protocol: pointer to the corresponding pnp_protocol structure
|
||||
*/
|
||||
void pnp_unregister_protocol(struct pnp_protocol *protocol)
|
||||
{
|
||||
pnp_remove_protocol(protocol);
|
||||
device_unregister(&protocol->dev);
|
||||
}
|
||||
|
||||
static void pnp_free_ids(struct pnp_dev *dev)
|
||||
{
|
||||
struct pnp_id *id;
|
||||
@ -220,12 +210,6 @@ int pnp_add_device(struct pnp_dev *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __pnp_remove_device(struct pnp_dev *dev)
|
||||
{
|
||||
pnp_delist_device(dev);
|
||||
device_unregister(&dev->dev);
|
||||
}
|
||||
|
||||
static int __init pnp_init(void)
|
||||
{
|
||||
return bus_register(&pnp_bus_type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user