Commit 26ba05e4 authored by Grant Grundler's avatar Grant Grundler Committed by Greg Kroah-Hartman

PCI: pci.txt fix __devexit() usage

Marin Mitov <mitov@issp.bas.bg> spotted a brainfart where I had
failed to update copied text with *_remove and __devexit().

Marin made a good comment in his email to me:
| mydriver_probe() is _always_ executed, while mydriver_remove() is not.
| See: include/linux/init.h

Which says:
/* Functions marked as __devexit may be discarded at kernel link time, depending
   on config options.  Newer versions of binutils detect references from
   retained sections to discarded sections and flag an error.  Pointers to
   __devexit functions must use __devexit_p(function_name), the wrapper will
   insert either the function_name or NULL, depending on the config options.
 */
Signed-off-by: default avatarGrant Grundler <grundler@parisc-linux.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f95d882d
...@@ -205,8 +205,8 @@ Tips on when/where to use the above attributes: ...@@ -205,8 +205,8 @@ Tips on when/where to use the above attributes:
exclusively called by the probe() routine, can be marked __devinit. exclusively called by the probe() routine, can be marked __devinit.
Ditto for remove() and __devexit. Ditto for remove() and __devexit.
o If mydriver_probe() is marked with __devinit(), then all address o If mydriver_remove() is marked with __devexit(), then all address
references to mydriver_probe must use __devexit_p(mydriver_probe) references to mydriver_remove must use __devexit_p(mydriver_remove)
(in the struct pci_driver declaration for example). (in the struct pci_driver declaration for example).
__devexit_p() will generate the function name _or_ NULL if the __devexit_p() will generate the function name _or_ NULL if the
function will be discarded. For an example, see drivers/net/tg3.c. function will be discarded. For an example, see drivers/net/tg3.c.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment