lkml.org 
[lkml]   [2010]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] isdn: Cleanup Sections in PCMCIA driver sedlbauer
Wolfram Sang schrieb:
> Hi Henrik,
>
> thanks for the work. Please, just keep the placement of those attributes
> consistent. Otherwise it might be easy to miss:
>
>
>> -static int sedlbauer_config(struct pcmcia_device *link);
>> +static int sedlbauer_config(struct pcmcia_device *link) __devinit ;
>>
>
> Wrong.
>
>
>> -static int sedlbauer_probe(struct pcmcia_device *link)
>> +static int __devinit sedlbauer_probe(struct pcmcia_device *link)
>> {
>>
>
> Right.
>
> (I think checkpatch checks for this, too)
>
> Regards,
>
> Wolfram
>
Hi there,

Imho should these functions be reorderd, so that no prototypes are required in a driver file.
If somebody wishes, I would do that for those.

For the prototypes I was following init.h, heres a snippet:

* Usage:
* For functions:
*
* You should add __init immediately before the function name, like:
*
* static void __init initme(int x, int y)
* {
* extern int z; z = x * y;
* }
*
* If the function has a prototype somewhere, you can also add
* __init between closing brace of the prototype and semicolon:
*
* extern int initialize_foobar_device(int, int, int) __init;
*



\
 
 \ /
  Last update: 2010-03-25 15:09    [from the cache]
©2003-2011 Jasper Spaans