mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
PCI: Make the struct pci_dev * argument of pci_fixup_irqs const.
Aside of the usual motivation for constification, this function has a history of being abused a hook for interrupt and other fixups so I turned this function const ages ago in the MIPS code but it should be done treewide. Due to function pointer passing in varous places a few other functions had to be constified as well. Signed-off-by: Ralf Baechle <[email protected]> To: Anton Vorontsov <[email protected]> To: Chris Metcalf <[email protected]> To: Colin Cross <[email protected]> Acked-by: "David S. Miller" <[email protected]> To: Eric Miao <[email protected]> To: Erik Gilling <[email protected]> Acked-by: Guan Xuetao <[email protected]> To: "H. Peter Anvin" <[email protected]> To: Imre Kaloz <[email protected]> To: Ingo Molnar <[email protected]> To: Ivan Kokshaysky <[email protected]> To: Jesse Barnes <[email protected]> To: Krzysztof Halasa <[email protected]> To: Lennert Buytenhek <[email protected]> To: Matt Turner <[email protected]> To: Nicolas Pitre <[email protected]> To: Olof Johansson <[email protected]> Acked-by: Paul Mundt <[email protected]> To: Richard Henderson <[email protected]> To: Russell King <[email protected]> To: Thomas Gleixner <[email protected]> Cc: Andrew Morton <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Jesse Barnes <[email protected]>
This commit is contained in:
parent
05d3ac267a
commit
d5341942d7
101 changed files with 130 additions and 113 deletions
|
|
@ -5,7 +5,7 @@
|
|||
#include <cpu/irq.h>
|
||||
#include "pci-sh5.h"
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
int result = -1;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ static void __init gapspci_fixup_resources(struct pci_dev *dev)
|
|||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, gapspci_fixup_resources);
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
/*
|
||||
* The interrupt routing semantics here are quite trivial.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#define PCIMCR_MRSET_OFF 0xBFFFFFFF
|
||||
#define PCIMCR_RFSH_OFF 0xFFFFFFFB
|
||||
|
||||
int pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
{
|
||||
/*
|
||||
* slot0: pin1-4 = irq5,6,7,8
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ static char irq_tab[] __initdata = {
|
|||
65, 66, 67, 68,
|
||||
};
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
{
|
||||
return irq_tab[slot];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ static char lboxre2_irq_tab[] __initdata = {
|
|||
IRQ_ETH0, IRQ_ETH1, IRQ_INTA, IRQ_INTD,
|
||||
};
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
{
|
||||
if (mach_is_lboxre2())
|
||||
return lboxre2_irq_tab[slot];
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ static char sdk7780_irq_tab[4][16] __initdata = {
|
|||
{ 68, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||
};
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
{
|
||||
return sdk7780_irq_tab[pin-1][slot];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <linux/io.h>
|
||||
#include "pci-sh4.h"
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *, u8 slot, u8 pin)
|
||||
{
|
||||
switch (slot) {
|
||||
case 0: return 13;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/pci.h>
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
int irq;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include "pci-sh4.h"
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
{
|
||||
int irq = -1;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ static char titan_irq_tab[] __initdata = {
|
|||
TITAN_IRQ_USB,
|
||||
};
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
{
|
||||
int irq = titan_irq_tab[slot];
|
||||
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ static int __init pcie_init(struct sh7786_pcie_port *port)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
|
||||
{
|
||||
return 71;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
|
|||
#endif
|
||||
|
||||
/* Board-specific fixup routines. */
|
||||
int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin);
|
||||
int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin);
|
||||
|
||||
extern void pcibios_resource_to_bus(struct pci_dev *dev,
|
||||
struct pci_bus_region *region, struct resource *res);
|
||||
|
|
|
|||
Loading…
Reference in a new issue