diff options
Diffstat (limited to 'Documentation/PCI')
-rw-r--r-- | Documentation/PCI/pci-iov-howto.txt | 6 | ||||
-rw-r--r-- | Documentation/PCI/pci.txt | 20 |
2 files changed, 3 insertions, 23 deletions
diff --git a/Documentation/PCI/pci-iov-howto.txt b/Documentation/PCI/pci-iov-howto.txt index cfaca7e69893..86551cc72e03 100644 --- a/Documentation/PCI/pci-iov-howto.txt +++ b/Documentation/PCI/pci-iov-howto.txt | |||
@@ -76,7 +76,7 @@ To notify SR-IOV core of Virtual Function Migration: | |||
76 | 76 | ||
77 | Following piece of code illustrates the usage of the SR-IOV API. | 77 | Following piece of code illustrates the usage of the SR-IOV API. |
78 | 78 | ||
79 | static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id) | 79 | static int dev_probe(struct pci_dev *dev, const struct pci_device_id *id) |
80 | { | 80 | { |
81 | pci_enable_sriov(dev, NR_VIRTFN); | 81 | pci_enable_sriov(dev, NR_VIRTFN); |
82 | 82 | ||
@@ -85,7 +85,7 @@ static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id * | |||
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | static void __devexit dev_remove(struct pci_dev *dev) | 88 | static void dev_remove(struct pci_dev *dev) |
89 | { | 89 | { |
90 | pci_disable_sriov(dev); | 90 | pci_disable_sriov(dev); |
91 | 91 | ||
@@ -131,7 +131,7 @@ static struct pci_driver dev_driver = { | |||
131 | .name = "SR-IOV Physical Function driver", | 131 | .name = "SR-IOV Physical Function driver", |
132 | .id_table = dev_id_table, | 132 | .id_table = dev_id_table, |
133 | .probe = dev_probe, | 133 | .probe = dev_probe, |
134 | .remove = __devexit_p(dev_remove), | 134 | .remove = dev_remove, |
135 | .suspend = dev_suspend, | 135 | .suspend = dev_suspend, |
136 | .resume = dev_resume, | 136 | .resume = dev_resume, |
137 | .shutdown = dev_shutdown, | 137 | .shutdown = dev_shutdown, |
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt index aa09e5476bba..bccf602a87f5 100644 --- a/Documentation/PCI/pci.txt +++ b/Documentation/PCI/pci.txt | |||
@@ -183,12 +183,6 @@ Please mark the initialization and cleanup functions where appropriate | |||
183 | initializes. | 183 | initializes. |
184 | __exit Exit code. Ignored for non-modular drivers. | 184 | __exit Exit code. Ignored for non-modular drivers. |
185 | 185 | ||
186 | |||
187 | __devinit Device initialization code. | ||
188 | Identical to __init if the kernel is not compiled | ||
189 | with CONFIG_HOTPLUG, normal function otherwise. | ||
190 | __devexit The same for __exit. | ||
191 | |||
192 | Tips on when/where to use the above attributes: | 186 | Tips on when/where to use the above attributes: |
193 | o The module_init()/module_exit() functions (and all | 187 | o The module_init()/module_exit() functions (and all |
194 | initialization functions called _only_ from these) | 188 | initialization functions called _only_ from these) |
@@ -196,20 +190,6 @@ Tips on when/where to use the above attributes: | |||
196 | 190 | ||
197 | o Do not mark the struct pci_driver. | 191 | o Do not mark the struct pci_driver. |
198 | 192 | ||
199 | o The ID table array should be marked __devinitconst; this is done | ||
200 | automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE(). | ||
201 | |||
202 | o The probe() and remove() functions should be marked __devinit | ||
203 | and __devexit respectively. All initialization functions | ||
204 | exclusively called by the probe() routine, can be marked __devinit. | ||
205 | Ditto for remove() and __devexit. | ||
206 | |||
207 | o If mydriver_remove() is marked with __devexit(), then all address | ||
208 | references to mydriver_remove must use __devexit_p(mydriver_remove) | ||
209 | (in the struct pci_driver declaration for example). | ||
210 | __devexit_p() will generate the function name _or_ NULL if the | ||
211 | function will be discarded. For an example, see drivers/net/tg3.c. | ||
212 | |||
213 | o Do NOT mark a function if you are not sure which mark to use. | 193 | o Do NOT mark a function if you are not sure which mark to use. |
214 | Better to not mark the function than mark the function wrong. | 194 | Better to not mark the function than mark the function wrong. |
215 | 195 | ||