[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080114092905.227c5a38@lxorguk.ukuu.org.uk>
Date: Mon, 14 Jan 2008 09:29:05 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: "Mike Frysinger" <vapier.adi@...il.com>
Cc: "Marc Pignat" <marc.pignat@...s.ch>, wim@...ana.be,
linux-kernel@...r.kernel.org
Subject: Re: [RFC, PATCH] watchdog on gpio
> > Saves memory - you can't make inlined strings __initdata without breaking
> > some compilers. So it is correct.
>
> you could make the same argument about all strings used in all __init
> functions. making a special case for this one string is just
> confusing. this is also used from the *platfrom driver probe*
> function, not the *module init* function, which means it should be
> __devinitdata (see below) ... which quickly adds to the
> confusion/craziness.
Not neccessarily see below. For strings there is a tricky tradeoff
between space on embedded boxes and simplicity. On a 2GB desktop PC the
decision is fairly trivial, on a PDA it gets a bit more important.
> > > > +static int __init gpio_wdt_probe(struct platform_device *pdev)
> > >
> > > shouldnt this be __devinit ?
> >
> > IFF the device can be found/removed dynamically.
>
> wont __init get freed once the module has finished loading ?
If your platform creates the device statically (as a lot of embedded
platforms do) then the __init is fine. The platform register in
init_module will call back the driver probe method and attach the device
before the init_module exits.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists