Skip to content

Commit defb53a

Browse files
committed
Merge tag 'pnp-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull PNP updates from Rafael Wysocki: "These clean the PNP code somewhat: - Remove the now unused pnp_find_card() function (Christoph Hellwig) - Drop duplicate pci.h include from the quirks code and add an "internal.h" include to acpi_pnp.c to fix a compiler warning (Tian Tao)" * tag 'pnp-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PNP: remove the now unused pnp_find_card() function PNP: ACPI: Fix missing-prototypes in acpi_pnp.c PNP: quirks: Fix duplicate included pci.h
2 parents cf1d2b4 + 2ef0342 commit defb53a

5 files changed

Lines changed: 2 additions & 35 deletions

File tree

Documentation/admin-guide/pnp.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,6 @@ ISAPNP drivers. They should serve as a temporary solution only.
281281

282282
They are as follows::
283283

284-
struct pnp_card *pnp_find_card(unsigned short vendor,
285-
unsigned short device,
286-
struct pnp_card *from)
287-
288284
struct pnp_dev *pnp_find_dev(struct pnp_card *card,
289285
unsigned short vendor,
290286
unsigned short function,

drivers/acpi/acpi_pnp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <linux/module.h>
1212
#include <linux/ctype.h>
1313

14+
#include "internal.h"
15+
1416
static const struct acpi_device_id acpi_pnp_device_ids[] = {
1517
/* pata_isapnp */
1618
{"PNP0600"}, /* Generic ESDI/IDE/ATA compatible hard disk controller */

drivers/pnp/isapnp/compat.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,6 @@ static void pnp_convert_id(char *buf, unsigned short vendor,
2121
(device >> 12) & 0x0f, (device >> 8) & 0x0f);
2222
}
2323

24-
struct pnp_card *pnp_find_card(unsigned short vendor, unsigned short device,
25-
struct pnp_card *from)
26-
{
27-
char id[8];
28-
char any[8];
29-
struct list_head *list;
30-
31-
pnp_convert_id(id, vendor, device);
32-
pnp_convert_id(any, ISAPNP_ANY_ID, ISAPNP_ANY_ID);
33-
34-
list = from ? from->global_list.next : pnp_cards.next;
35-
36-
while (list != &pnp_cards) {
37-
struct pnp_card *card = global_to_pnp_card(list);
38-
39-
if (compare_pnp_id(card->id, id) || (memcmp(id, any, 7) == 0))
40-
return card;
41-
list = list->next;
42-
}
43-
return NULL;
44-
}
45-
4624
struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor,
4725
unsigned short function, struct pnp_dev *from)
4826
{
@@ -86,5 +64,4 @@ struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor,
8664
return NULL;
8765
}
8866

89-
EXPORT_SYMBOL(pnp_find_card);
9067
EXPORT_SYMBOL(pnp_find_dev);

drivers/pnp/quirks.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ static void quirk_ad1815_mpu_resources(struct pnp_dev *dev)
226226
dev_info(&dev->dev, "made independent IRQ optional\n");
227227
}
228228

229-
#include <linux/pci.h>
230-
231229
static void quirk_system_pci_resources(struct pnp_dev *dev)
232230
{
233231
struct pci_dev *pdev = NULL;

include/linux/isapnp.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ static inline int isapnp_proc_done(void) { return 0; }
7575
#endif
7676

7777
/* compat */
78-
struct pnp_card *pnp_find_card(unsigned short vendor,
79-
unsigned short device,
80-
struct pnp_card *from);
8178
struct pnp_dev *pnp_find_dev(struct pnp_card *card,
8279
unsigned short vendor,
8380
unsigned short function,
@@ -92,9 +89,6 @@ static inline int isapnp_cfg_end(void) { return -ENODEV; }
9289
static inline unsigned char isapnp_read_byte(unsigned char idx) { return 0xff; }
9390
static inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; }
9491

95-
static inline struct pnp_card *pnp_find_card(unsigned short vendor,
96-
unsigned short device,
97-
struct pnp_card *from) { return NULL; }
9892
static inline struct pnp_dev *pnp_find_dev(struct pnp_card *card,
9993
unsigned short vendor,
10094
unsigned short function,

0 commit comments

Comments
 (0)