aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/PCI
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-12-21 18:15:02 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-03 18:57:16 -0500
commit63a29f744fe1c19742039ce7526663a98f172f7e (patch)
tree52eea88a9e78d0b646c2a549b97f08af29fa9fcb /Documentation/PCI
parent0fe763c570ad2701c830b9e4e53c65ad89c11c32 (diff)
Documentation: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from the kernel documentation. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/PCI')
-rw-r--r--Documentation/PCI/pci-iov-howto.txt6
-rw-r--r--Documentation/PCI/pci.txt20
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
77Following piece of code illustrates the usage of the SR-IOV API. 77Following piece of code illustrates the usage of the SR-IOV API.
78 78
79static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id) 79static 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
88static void __devexit dev_remove(struct pci_dev *dev) 88static 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
192Tips on when/where to use the above attributes: 186Tips 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