Skip to content

Commit 907872b

Browse files
groeckhdeller
authored andcommitted
parisc: Move pci_dev_is_behind_card_dino to where it is used
parisc build test images fail to compile with the following error. drivers/parisc/dino.c:160:12: error: 'pci_dev_is_behind_card_dino' defined but not used Move the function just ahead of its only caller to avoid the error. Fixes: 5fa1659 ("parisc: Disable HP HSC-PCI Cards to prevent kernel crash") Cc: Helge Deller <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent e4f2006 commit 907872b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/parisc/dino.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,6 @@ static inline struct dino_device *DINO_DEV(struct pci_hba_data *hba)
156156
return container_of(hba, struct dino_device, hba);
157157
}
158158

159-
/* Check if PCI device is behind a Card-mode Dino. */
160-
static int pci_dev_is_behind_card_dino(struct pci_dev *dev)
161-
{
162-
struct dino_device *dino_dev;
163-
164-
dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge));
165-
return is_card_dino(&dino_dev->hba.dev->id);
166-
}
167-
168159
/*
169160
* Dino Configuration Space Accessor Functions
170161
*/
@@ -447,6 +438,15 @@ static void quirk_cirrus_cardbus(struct pci_dev *dev)
447438
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6832, quirk_cirrus_cardbus );
448439

449440
#ifdef CONFIG_TULIP
441+
/* Check if PCI device is behind a Card-mode Dino. */
442+
static int pci_dev_is_behind_card_dino(struct pci_dev *dev)
443+
{
444+
struct dino_device *dino_dev;
445+
446+
dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge));
447+
return is_card_dino(&dino_dev->hba.dev->id);
448+
}
449+
450450
static void pci_fixup_tulip(struct pci_dev *dev)
451451
{
452452
if (!pci_dev_is_behind_card_dino(dev))

0 commit comments

Comments
 (0)