All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Joe Perches <joe@perches.com>, Sangho Yi <antiroot@gmail.com>
Cc: broonie@opensource.wolfsonmicro.com, cbow@mail.ru,
	dwmw2@inradead.org, linux-kernel@vger.kernel.org,
	patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH] wm831x: Add and use a wm831x_irq_byname convenience function
Date: Mon, 26 Nov 2012 21:35:15 +0000	[thread overview]
Message-ID: <20121126213515.C7AED3E08B7@localhost> (raw)
In-Reply-To: <1350496855.3072.55.camel@joe-AO722>

On Wed, 17 Oct 2012 11:00:55 -0700, Joe Perches <joe@perches.com> wrote:
> Add and use a convenience inline to get an irq by name.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> Perhaps this is a better alternative to code reflowing.
> 
>  include/linux/mfd/wm831x/core.h       |  8 ++++++++
>  drivers/input/touchscreen/wm831x-ts.c |  7 ++-----
>  drivers/power/wm831x_power.c          | 20 ++++++++------------
>  drivers/regulator/wm831x-dcdc.c       | 23 +++++++++--------------
>  drivers/regulator/wm831x-ldo.c        | 10 ++++------
>  drivers/rtc/rtc-wm831x.c              |  2 +-
>  6 files changed, 32 insertions(+), 38 deletions(-)
> 
> diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h
> index 4a3b83a..96cd081 100644
> --- a/include/linux/mfd/wm831x/core.h
> +++ b/include/linux/mfd/wm831x/core.h
> @@ -20,6 +20,7 @@
>  #include <linux/irqdomain.h>
>  #include <linux/list.h>
>  #include <linux/regmap.h>
> +#include <linux/platform_device.h>
>  
>  /*
>   * Register values.
> @@ -425,6 +426,13 @@ static inline int wm831x_irq(struct wm831x *wm831x, int irq)
>  	return irq_create_mapping(wm831x->irq_domain, irq);
>  }
>  
> +static inline int wm831x_irq_byname(struct wm831x *wm831x,
> +				    struct platform_device *pdev,
> +				    const char *name)
> +{
> +	return wm831x_irq(wm831x, platform_get_irq_byname(pdev, name));
> +}
> +
>  extern struct regmap_config wm831x_regmap_config;

Looks reasonable

g.


  reply	other threads:[~2012-11-26 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 15:01 [PATCH 1/3] power: wm831x_power: Fixed indentation errors Sangho Yi
2012-10-17 15:01 ` [PATCH 2/3] power: wm831x_power.c: fixed const struct declaration warning Sangho Yi
2012-10-17 15:01 ` [PATCH 3/3] power: wm831x_power.c: Fixed indentation bug and whitespace errors Sangho Yi
2012-10-17 15:39   ` Joe Perches
2012-10-17 18:00     ` [PATCH] wm831x: Add and use a wm831x_irq_byname convenience function Joe Perches
2012-11-26 21:35       ` Grant Likely [this message]
2012-11-26 21:40         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121126213515.C7AED3E08B7@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=antiroot@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cbow@mail.ru \
    --cc=dwmw2@inradead.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.