I'm trying to build a driver for my SD card, but I get an error on this line:
static void __devexit rtsx_remove(struct pci_dev *pci)
Saying:
/home/kenkron/Downloads/rts_pstor/rtsx.c:916:22: error: expected ‘=’,‘,’,‘;’, ‘asm’ or ‘__attribute__’ before ‘rtsx_probe’ static int __devinit rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
Why is __devexit
before the function name, and how is it supposed to work?
Edit: my question is about what __devexit
is in the context of the function definition. Eugene Sh perhaps implied it was a macro, but what would it be doing in the function definition? Other functions I've seen have, at most, static and a return type.
__devexit
is defined ininclude/linux.h
. Make sure you include that header. If you have already done that, make sure you don't have any syntax errors in your code. Also check the previous lines for errors, like eg. a missing semicolon.