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

2008-09-25 Thread Tony Lindgren
From: Paul Walmsley <[EMAIL PROTECTED]>

Mark functions called only at init time as __init.

Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
---
 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 fdebf96..52ecddd 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");
@@ -694,7 +694,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@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/i2c


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

2008-09-25 Thread Tony Lindgren
From: Paul Walmsley <[EMAIL PROTECTED]>

Mark functions called only at init time as __init.

Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
---
 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@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/i2c


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

2008-09-29 Thread Ben Dooks
On Thu, Sep 25, 2008 at 10:53:52AM +0300, Tony Lindgren wrote:
> From: Paul Walmsley <[EMAIL PROTECTED]>
> 
> Mark functions called only at init time as __init.

surely these should be __devinit in case of hotplugged-ness?
 
> Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
> Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
> ---
>  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@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/i2c

-- 
Ben ([EMAIL PROTECTED], http://www.fluff.org/)

  'a smiley only costs 4 bytes'

___
i2c mailing list
i2c@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/i2c


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

2008-10-17 Thread Tony Lindgren
* Ben Dooks <[EMAIL PROTECTED]> [080929 15:30]:
> On Thu, Sep 25, 2008 at 10:53:52AM +0300, Tony Lindgren wrote:
> > From: Paul Walmsley <[EMAIL PROTECTED]>
> > 
> > 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 <[EMAIL PROTECTED]>
> > Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
> > ---
> >  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@lm-sensors.org
> > http://lists.lm-sensors.org/mailman/listinfo/i2c
> 
> -- 
> Ben ([EMAIL PROTECTED], http://www.fluff.org/)
> 
>   'a smiley only costs 4 bytes'
>From 168065ac952d019a1a578c2cdc46df4ef01044c2 Mon Sep 17 00:00:00 2001
From: Paul Walmsley <[EMAIL PROTECTED]>
Date: Fri, 17 Oct 2008 07:44:58 -0700
Subject: [PATCH] i2c-omap: Mark init-only functions as __init

Mark functions called only at init time as __init.

Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
---
 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 5dd8a24..018d284 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 __devinit 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");
@@ -692,7 +692,7 @@ static const struct i2c_algorithm omap_i2c_algo = {
 	.functionality	= omap_i2c_func,
 };
 
-static int
+static int __devinit
 omap_i2c_probe(struct platform_device *pdev)
 {
 	struct omap_i2c_dev	*dev;
-- 
1.5.6.rc3.21.g8c6b5

___
i2c mailing list
i2c@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

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

2008-10-17 Thread Tony Lindgren
* Tony Lindgren <[EMAIL PROTECTED]> [081017 08:40]:
> * Ben Dooks <[EMAIL PROTECTED]> [080929 15:30]:
> > On Thu, Sep 25, 2008 at 10:53:52AM +0300, Tony Lindgren wrote:
> > > From: Paul Walmsley <[EMAIL PROTECTED]>
> > > 
> > > Mark functions called only at init time as __init.
> > 
> > surely these should be __devinit in case of hotplugged-ness?
> 
> Here's this one fixed.

Sorry, these should be __init, not __devinit as they are called from
platform_driver_register(), not i2c_add_driver(). Updated patch
again to revert to the original version.

> 
> Tony
> 
> 
> >  
> > > Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
> > > Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
> > > ---
> > >  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@lm-sensors.org
> > > http://lists.lm-sensors.org/mailman/listinfo/i2c
> > 
> > -- 
> > Ben ([EMAIL PROTECTED], http://www.fluff.org/)
> > 
> >   'a smiley only costs 4 bytes'
>From 827b812e278a3a4fceba0a6957bbaddf2a53d19c Mon Sep 17 00:00:00 2001
From: Paul Walmsley <[EMAIL PROTECTED]>
Date: Fri, 17 Oct 2008 07:44:58 -0700
Subject: [PATCH] i2c-omap: Mark init-only functions as __init

Mark functions called only at init time as __init.

Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]>
Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
---
 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 5dd8a24..45c9511 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");
@@ -692,7 +692,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@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/i2c