linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: Staticise ab3550 register access functions
@ 2010-06-09 13:54 Mark Brown
  2010-06-10 14:40 ` Linus WALLEIJ
  2010-06-18 21:55 ` Samuel Ortiz
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2010-06-09 13:54 UTC (permalink / raw)
  To: Samuel Ortiz, Linus Walleij; +Cc: linux-kernel, Mark Brown

These are now exported via an ops table rather than referenced
directly and so should be staticised.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/mfd/ab3550-core.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
index f54ab62..8a98739 100644
--- a/drivers/mfd/ab3550-core.c
+++ b/drivers/mfd/ab3550-core.c
@@ -589,16 +589,16 @@ static bool reg_read_allowed(const struct ab3550_reg_ranges *ranges, u8 reg)
 }
 
 /*
- * The exported register access functionality.
+ * The register access functionality.
  */
-int ab3550_get_chip_id(struct device *dev)
+static int ab3550_get_chip_id(struct device *dev)
 {
 	struct ab3550 *ab = dev_get_drvdata(dev->parent);
 	return (int)ab->chip_id;
 }
 
-int ab3550_mask_and_set_register_interruptible(struct device *dev, u8 bank,
-	u8 reg, u8 bitmask, u8 bitvalues)
+static int ab3550_mask_and_set_register_interruptible(struct device *dev,
+	u8 bank, u8 reg, u8 bitmask, u8 bitvalues)
 {
 	struct ab3550 *ab;
 	struct platform_device *pdev = to_platform_device(dev);
@@ -612,15 +612,15 @@ int ab3550_mask_and_set_register_interruptible(struct device *dev, u8 bank,
 		bitmask, bitvalues);
 }
 
-int ab3550_set_register_interruptible(struct device *dev, u8 bank, u8 reg,
-	u8 value)
+static int ab3550_set_register_interruptible(struct device *dev, u8 bank,
+	u8 reg, u8 value)
 {
 	return ab3550_mask_and_set_register_interruptible(dev, bank, reg, 0xFF,
 		value);
 }
 
-int ab3550_get_register_interruptible(struct device *dev, u8 bank, u8 reg,
-	u8 *value)
+static int ab3550_get_register_interruptible(struct device *dev, u8 bank,
+	u8 reg, u8 *value)
 {
 	struct ab3550 *ab;
 	struct platform_device *pdev = to_platform_device(dev);
@@ -633,7 +633,7 @@ int ab3550_get_register_interruptible(struct device *dev, u8 bank, u8 reg,
 	return get_register_interruptible(ab, bank, reg, value);
 }
 
-int ab3550_get_register_page_interruptible(struct device *dev, u8 bank,
+static int ab3550_get_register_page_interruptible(struct device *dev, u8 bank,
 	u8 first_reg, u8 *regvals, u8 numregs)
 {
 	struct ab3550 *ab;
@@ -649,7 +649,8 @@ int ab3550_get_register_page_interruptible(struct device *dev, u8 bank,
 		numregs);
 }
 
-int ab3550_event_registers_startup_state_get(struct device *dev, u8 *event)
+static int ab3550_event_registers_startup_state_get(struct device *dev,
+	u8 *event)
 {
 	struct ab3550 *ab;
 
@@ -661,7 +662,7 @@ int ab3550_event_registers_startup_state_get(struct device *dev, u8 *event)
 	return 0;
 }
 
-int ab3550_startup_irq_enabled(struct device *dev, unsigned int irq)
+static int ab3550_startup_irq_enabled(struct device *dev, unsigned int irq)
 {
 	struct ab3550 *ab;
 	struct ab3550_platform_data *plf_data;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] mfd: Staticise ab3550 register access functions
  2010-06-09 13:54 [PATCH] mfd: Staticise ab3550 register access functions Mark Brown
@ 2010-06-10 14:40 ` Linus WALLEIJ
  2010-06-18 21:55 ` Samuel Ortiz
  1 sibling, 0 replies; 3+ messages in thread
From: Linus WALLEIJ @ 2010-06-10 14:40 UTC (permalink / raw)
  To: Mark Brown, Samuel Ortiz; +Cc: linux-kernel

[Mark Brown]
> These are now exported via an ops table rather than referenced
> directly and so should be staticised.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Linus Walleij <linus.walleij@stericsson.com>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: Staticise ab3550 register access functions
  2010-06-09 13:54 [PATCH] mfd: Staticise ab3550 register access functions Mark Brown
  2010-06-10 14:40 ` Linus WALLEIJ
@ 2010-06-18 21:55 ` Samuel Ortiz
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2010-06-18 21:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linus Walleij, linux-kernel

Hi Mark,

On Wed, Jun 09, 2010 at 02:54:54PM +0100, Mark Brown wrote:
> These are now exported via an ops table rather than referenced
> directly and so should be staticised.
Patch applied, thanks a lot.

Cheers,
Samuel.


> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  drivers/mfd/ab3550-core.c |   23 ++++++++++++-----------
>  1 files changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
> index f54ab62..8a98739 100644
> --- a/drivers/mfd/ab3550-core.c
> +++ b/drivers/mfd/ab3550-core.c
> @@ -589,16 +589,16 @@ static bool reg_read_allowed(const struct ab3550_reg_ranges *ranges, u8 reg)
>  }
>  
>  /*
> - * The exported register access functionality.
> + * The register access functionality.
>   */
> -int ab3550_get_chip_id(struct device *dev)
> +static int ab3550_get_chip_id(struct device *dev)
>  {
>  	struct ab3550 *ab = dev_get_drvdata(dev->parent);
>  	return (int)ab->chip_id;
>  }
>  
> -int ab3550_mask_and_set_register_interruptible(struct device *dev, u8 bank,
> -	u8 reg, u8 bitmask, u8 bitvalues)
> +static int ab3550_mask_and_set_register_interruptible(struct device *dev,
> +	u8 bank, u8 reg, u8 bitmask, u8 bitvalues)
>  {
>  	struct ab3550 *ab;
>  	struct platform_device *pdev = to_platform_device(dev);
> @@ -612,15 +612,15 @@ int ab3550_mask_and_set_register_interruptible(struct device *dev, u8 bank,
>  		bitmask, bitvalues);
>  }
>  
> -int ab3550_set_register_interruptible(struct device *dev, u8 bank, u8 reg,
> -	u8 value)
> +static int ab3550_set_register_interruptible(struct device *dev, u8 bank,
> +	u8 reg, u8 value)
>  {
>  	return ab3550_mask_and_set_register_interruptible(dev, bank, reg, 0xFF,
>  		value);
>  }
>  
> -int ab3550_get_register_interruptible(struct device *dev, u8 bank, u8 reg,
> -	u8 *value)
> +static int ab3550_get_register_interruptible(struct device *dev, u8 bank,
> +	u8 reg, u8 *value)
>  {
>  	struct ab3550 *ab;
>  	struct platform_device *pdev = to_platform_device(dev);
> @@ -633,7 +633,7 @@ int ab3550_get_register_interruptible(struct device *dev, u8 bank, u8 reg,
>  	return get_register_interruptible(ab, bank, reg, value);
>  }
>  
> -int ab3550_get_register_page_interruptible(struct device *dev, u8 bank,
> +static int ab3550_get_register_page_interruptible(struct device *dev, u8 bank,
>  	u8 first_reg, u8 *regvals, u8 numregs)
>  {
>  	struct ab3550 *ab;
> @@ -649,7 +649,8 @@ int ab3550_get_register_page_interruptible(struct device *dev, u8 bank,
>  		numregs);
>  }
>  
> -int ab3550_event_registers_startup_state_get(struct device *dev, u8 *event)
> +static int ab3550_event_registers_startup_state_get(struct device *dev,
> +	u8 *event)
>  {
>  	struct ab3550 *ab;
>  
> @@ -661,7 +662,7 @@ int ab3550_event_registers_startup_state_get(struct device *dev, u8 *event)
>  	return 0;
>  }
>  
> -int ab3550_startup_irq_enabled(struct device *dev, unsigned int irq)
> +static int ab3550_startup_irq_enabled(struct device *dev, unsigned int irq)
>  {
>  	struct ab3550 *ab;
>  	struct ab3550_platform_data *plf_data;
> -- 
> 1.7.1
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-18 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09 13:54 [PATCH] mfd: Staticise ab3550 register access functions Mark Brown
2010-06-10 14:40 ` Linus WALLEIJ
2010-06-18 21:55 ` Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).