Re: [PATCH] __init fixes in IDE

From: Jakub Jelinek (jakub@redhat.com)
Date: Mon Feb 14 2000 - 04:07:40 EST


On Sun, Feb 13, 2000 at 11:32:13PM +0100, Andrzej Krzysztofowicz wrote:
> Hi,
> I noticed that in some IDE drivers init functions are marked __init
> and in some others (mainly: old drivers and non-x86 architectures) they
> are not. The following patch should fix this situation in most IDE
> code...
>
> Andre, are theese functions intentionally *not marked* __init ?
> Does Amiga/Mac support __init ?
>
> Regards
> Andrzej
>
> *************************************************************************
> diff -u --recursive 2.3.44/drivers/block/ali14xx.c linux/drivers/block/ali14xx.c
> --- 2.3.44/drivers/block/ali14xx.c Fri Nov 12 19:12:11 1999
> +++ linux/drivers/block/ali14xx.c Sun Feb 13 00:40:29 2000
> @@ -55,12 +55,12 @@
>
> /* port addresses for auto-detection */
> #define ALI_NUM_PORTS 4
> -static int ports[ALI_NUM_PORTS] = {0x074, 0x0f4, 0x034, 0x0e4};
> +static int __init ports[ALI_NUM_PORTS] = {0x074, 0x0f4, 0x034, 0x0e4};

You should use __initdata for data, not __init, like:

static int ports[ALI_NUM_PORTS] __initdata = {0x074, 0x0f4, 0x034, 0x0e4};

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.45 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

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



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:26 EST