[i2c] [PATCH 6/8] i2c-omap: Mark init-only functions as __init

Tony Lindgren tony at atomide.com
Fri Oct 17 17:39:25 CEST 2008


* Ben Dooks <ben-linux at fluff.org> [080929 15:30]:
> On Thu, Sep 25, 2008 at 10:53:52AM +0300, Tony Lindgren wrote:
> > From: Paul Walmsley <paul at pwsan.com>
> > 
> > Mark functions called only at init time as __init.
> 
> surely these should be __devinit in case of hotplugged-ness?

Here's this one fixed.

Tony


>  
> > Signed-off-by: Paul Walmsley <paul at pwsan.com>
> > Signed-off-by: Tony Lindgren <tony at atomide.com>
> > ---
> >  drivers/i2c/busses/i2c-omap.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> > index b41431a..e71f1f2 100644
> > --- a/drivers/i2c/busses/i2c-omap.c
> > +++ b/drivers/i2c/busses/i2c-omap.c
> > @@ -154,7 +154,7 @@ static inline u16 omap_i2c_read_reg(struct omap_i2c_dev *i2c_dev, int reg)
> >  	return __raw_readw(i2c_dev->base + reg);
> >  }
> >  
> > -static int omap_i2c_get_clocks(struct omap_i2c_dev *dev)
> > +static int __init omap_i2c_get_clocks(struct omap_i2c_dev *dev)
> >  {
> >  	if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
> >  		dev->iclk = clk_get(dev->dev, "i2c_ick");
> > @@ -697,7 +697,7 @@ static const struct i2c_algorithm omap_i2c_algo = {
> >  	.functionality	= omap_i2c_func,
> >  };
> >  
> > -static int
> > +static int __init
> >  omap_i2c_probe(struct platform_device *pdev)
> >  {
> >  	struct omap_i2c_dev	*dev;
> > -- 
> > 1.5.6.rc3.21.g8c6b5
> > 
> > 
> > _______________________________________________
> > i2c mailing list
> > i2c at lm-sensors.org
> > http://lists.lm-sensors.org/mailman/listinfo/i2c
> 
> -- 
> Ben (ben at fluff.org, http://www.fluff.org/)
> 
>   'a smiley only costs 4 bytes'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-i2c-omap-Mark-init-only-functions-as-__init.patch
Type: text/x-diff
Size: 1247 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/i2c/attachments/20081017/c857f5b6/attachment.bin 


More information about the i2c mailing list