.. | .. |
---|
4 | 4 | * |
---|
5 | 5 | * Handling for IPMI devices on the PCI bus. |
---|
6 | 6 | */ |
---|
| 7 | + |
---|
| 8 | +#define pr_fmt(fmt) "ipmi_pci: " fmt |
---|
| 9 | + |
---|
7 | 10 | #include <linux/module.h> |
---|
8 | 11 | #include <linux/pci.h> |
---|
9 | 12 | #include "ipmi_si.h" |
---|
10 | | - |
---|
11 | | -#define PFX "ipmi_pci: " |
---|
12 | 13 | |
---|
13 | 14 | static bool pci_registered; |
---|
14 | 15 | |
---|
.. | .. |
---|
40 | 41 | for (regspacing = DEFAULT_REGSPACING; regspacing <= 16;) { |
---|
41 | 42 | io->regspacing = regspacing; |
---|
42 | 43 | if (io->io_setup(io)) { |
---|
43 | | - dev_err(io->dev, |
---|
44 | | - "Could not setup I/O space\n"); |
---|
| 44 | + dev_err(io->dev, "Could not setup I/O space\n"); |
---|
45 | 45 | return DEFAULT_REGSPACING; |
---|
46 | 46 | } |
---|
47 | 47 | /* write invalid cmd */ |
---|
.. | .. |
---|
107 | 107 | io.addr_source_data = pdev; |
---|
108 | 108 | |
---|
109 | 109 | if (pci_resource_flags(pdev, 0) & IORESOURCE_IO) { |
---|
110 | | - io.addr_type = IPMI_IO_ADDR_SPACE; |
---|
| 110 | + io.addr_space = IPMI_IO_ADDR_SPACE; |
---|
111 | 111 | io.io_setup = ipmi_si_port_setup; |
---|
112 | 112 | } else { |
---|
113 | | - io.addr_type = IPMI_MEM_ADDR_SPACE; |
---|
| 113 | + io.addr_space = IPMI_MEM_ADDR_SPACE; |
---|
114 | 114 | io.io_setup = ipmi_si_mem_setup; |
---|
115 | 115 | } |
---|
116 | 116 | io.addr_data = pci_resource_start(pdev, 0); |
---|
.. | .. |
---|
126 | 126 | io.irq_setup = ipmi_std_irq_setup; |
---|
127 | 127 | |
---|
128 | 128 | dev_info(&pdev->dev, "%pR regsize %d spacing %d irq %d\n", |
---|
129 | | - &pdev->resource[0], io.regsize, io.regspacing, io.irq); |
---|
| 129 | + &pdev->resource[0], io.regsize, io.regspacing, io.irq); |
---|
130 | 130 | |
---|
131 | 131 | rv = ipmi_si_add_smi(&io); |
---|
132 | 132 | if (rv) |
---|
.. | .. |
---|
150 | 150 | MODULE_DEVICE_TABLE(pci, ipmi_pci_devices); |
---|
151 | 151 | |
---|
152 | 152 | static struct pci_driver ipmi_pci_driver = { |
---|
153 | | - .name = DEVICE_NAME, |
---|
| 153 | + .name = SI_DEVICE_NAME, |
---|
154 | 154 | .id_table = ipmi_pci_devices, |
---|
155 | 155 | .probe = ipmi_pci_probe, |
---|
156 | 156 | .remove = ipmi_pci_remove, |
---|
.. | .. |
---|
161 | 161 | if (si_trypci) { |
---|
162 | 162 | int rv = pci_register_driver(&ipmi_pci_driver); |
---|
163 | 163 | if (rv) |
---|
164 | | - pr_err(PFX "Unable to register PCI driver: %d\n", rv); |
---|
| 164 | + pr_err("Unable to register PCI driver: %d\n", rv); |
---|
165 | 165 | else |
---|
166 | 166 | pci_registered = true; |
---|
167 | 167 | } |
---|