pci/xen: Cleanup: convert int** to int[]
[deliverable/linux.git] / arch / x86 / include / asm / xen / pci.h
1 #ifndef _ASM_X86_XEN_PCI_H
2 #define _ASM_X86_XEN_PCI_H
3
4 #if defined(CONFIG_PCI_XEN)
5 extern int __init pci_xen_init(void);
6 extern int __init pci_xen_hvm_init(void);
7 #define pci_xen 1
8 #else
9 #define pci_xen 0
10 #define pci_xen_init (0)
11 static inline int pci_xen_hvm_init(void)
12 {
13 return -1;
14 }
15 #endif
16 #if defined(CONFIG_XEN_DOM0)
17 void __init xen_setup_pirqs(void);
18 #else
19 static inline void __init xen_setup_pirqs(void)
20 {
21 }
22 #endif
23
24 #if defined(CONFIG_PCI_MSI)
25 #if defined(CONFIG_PCI_XEN)
26 /* The drivers/pci/xen-pcifront.c sets this structure to
27 * its own functions.
28 */
29 struct xen_pci_frontend_ops {
30 int (*enable_msi)(struct pci_dev *dev, int vectors[]);
31 void (*disable_msi)(struct pci_dev *dev);
32 int (*enable_msix)(struct pci_dev *dev, int vectors[], int nvec);
33 void (*disable_msix)(struct pci_dev *dev);
34 };
35
36 extern struct xen_pci_frontend_ops *xen_pci_frontend;
37
38 static inline int xen_pci_frontend_enable_msi(struct pci_dev *dev,
39 int vectors[])
40 {
41 if (xen_pci_frontend && xen_pci_frontend->enable_msi)
42 return xen_pci_frontend->enable_msi(dev, vectors);
43 return -ENODEV;
44 }
45 static inline void xen_pci_frontend_disable_msi(struct pci_dev *dev)
46 {
47 if (xen_pci_frontend && xen_pci_frontend->disable_msi)
48 xen_pci_frontend->disable_msi(dev);
49 }
50 static inline int xen_pci_frontend_enable_msix(struct pci_dev *dev,
51 int vectors[], int nvec)
52 {
53 if (xen_pci_frontend && xen_pci_frontend->enable_msix)
54 return xen_pci_frontend->enable_msix(dev, vectors, nvec);
55 return -ENODEV;
56 }
57 static inline void xen_pci_frontend_disable_msix(struct pci_dev *dev)
58 {
59 if (xen_pci_frontend && xen_pci_frontend->disable_msix)
60 xen_pci_frontend->disable_msix(dev);
61 }
62 #endif /* CONFIG_PCI_XEN */
63 #endif /* CONFIG_PCI_MSI */
64
65 #endif /* _ASM_X86_XEN_PCI_H */
This page took 0.032202 seconds and 5 git commands to generate.