Re: [PATCH 1/4] isdn: Cleanup Sections in PCMCIA driver sedlbauer

From: Henrik Kretzschmar
Date: Thu Mar 25 2010 - 10:06:10 EST


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;
*


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/