From 759e56d9238ec0bb964965357f8bbb30ff2ec4b6 Mon Sep 17 00:00:00 2001 From: Tian Tao Date: Mon, 14 Sep 2020 08:44:50 +0800 Subject: PNP: quirks: Fix duplicate included pci.h linux/pci.h is included more than once. Remove the one that isn't necessary. Signed-off-by: Tian Tao [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki --- drivers/pnp/quirks.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index de99f371d362..ac98b9919029 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -226,8 +226,6 @@ static void quirk_ad1815_mpu_resources(struct pnp_dev *dev) dev_info(&dev->dev, "made independent IRQ optional\n"); } -#include - static void quirk_system_pci_resources(struct pnp_dev *dev) { struct pci_dev *pdev = NULL; -- cgit v1.2.3 From 38db63baf83a4ab89335c7c6fb210ecac74fa781 Mon Sep 17 00:00:00 2001 From: Tian Tao Date: Tue, 22 Sep 2020 10:11:14 +0800 Subject: PNP: ACPI: Fix missing-prototypes in acpi_pnp.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following warnings. drivers/acpi/acpi_pnp.c:382:13: warning: no previous prototype for ‘acpi_pnp_init’ [-Wmissing-prototypes]. Signed-off-by: Tian Tao [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_pnp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c index f3039b93ff61..4ed755a963aa 100644 --- a/drivers/acpi/acpi_pnp.c +++ b/drivers/acpi/acpi_pnp.c @@ -11,6 +11,8 @@ #include #include +#include "internal.h" + static const struct acpi_device_id acpi_pnp_device_ids[] = { /* pata_isapnp */ {"PNP0600"}, /* Generic ESDI/IDE/ATA compatible hard disk controller */ -- cgit v1.2.3 From 2ef0342530b0f487a65b5f6c94c85dce5f9b53b5 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 8 Oct 2020 08:53:03 +0200 Subject: PNP: remove the now unused pnp_find_card() function All user of the pnp_find_card() compat wrapper are gone, so remove the function as well. Signed-off-by: Christoph Hellwig Signed-off-by: Rafael J. Wysocki --- Documentation/admin-guide/pnp.rst | 4 ---- drivers/pnp/isapnp/compat.c | 23 ----------------------- include/linux/isapnp.h | 6 ------ 3 files changed, 33 deletions(-) diff --git a/Documentation/admin-guide/pnp.rst b/Documentation/admin-guide/pnp.rst index bab2d10631f0..3eda08191d13 100644 --- a/Documentation/admin-guide/pnp.rst +++ b/Documentation/admin-guide/pnp.rst @@ -281,10 +281,6 @@ ISAPNP drivers. They should serve as a temporary solution only. They are as follows:: - struct pnp_card *pnp_find_card(unsigned short vendor, - unsigned short device, - struct pnp_card *from) - struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, unsigned short function, diff --git a/drivers/pnp/isapnp/compat.c b/drivers/pnp/isapnp/compat.c index 6c845b628316..035e95092489 100644 --- a/drivers/pnp/isapnp/compat.c +++ b/drivers/pnp/isapnp/compat.c @@ -21,28 +21,6 @@ static void pnp_convert_id(char *buf, unsigned short vendor, (device >> 12) & 0x0f, (device >> 8) & 0x0f); } -struct pnp_card *pnp_find_card(unsigned short vendor, unsigned short device, - struct pnp_card *from) -{ - char id[8]; - char any[8]; - struct list_head *list; - - pnp_convert_id(id, vendor, device); - pnp_convert_id(any, ISAPNP_ANY_ID, ISAPNP_ANY_ID); - - list = from ? from->global_list.next : pnp_cards.next; - - while (list != &pnp_cards) { - struct pnp_card *card = global_to_pnp_card(list); - - if (compare_pnp_id(card->id, id) || (memcmp(id, any, 7) == 0)) - return card; - list = list->next; - } - return NULL; -} - struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, unsigned short function, struct pnp_dev *from) { @@ -86,5 +64,4 @@ struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, return NULL; } -EXPORT_SYMBOL(pnp_find_card); EXPORT_SYMBOL(pnp_find_dev); diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h index 11edb2109a68..dba18c95844b 100644 --- a/include/linux/isapnp.h +++ b/include/linux/isapnp.h @@ -75,9 +75,6 @@ static inline int isapnp_proc_done(void) { return 0; } #endif /* compat */ -struct pnp_card *pnp_find_card(unsigned short vendor, - unsigned short device, - struct pnp_card *from); struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, unsigned short function, @@ -92,9 +89,6 @@ static inline int isapnp_cfg_end(void) { return -ENODEV; } static inline unsigned char isapnp_read_byte(unsigned char idx) { return 0xff; } static inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; } -static inline struct pnp_card *pnp_find_card(unsigned short vendor, - unsigned short device, - struct pnp_card *from) { return NULL; } static inline struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor, unsigned short function, -- cgit v1.2.3