On Wed, 17 Oct 2012 11:00:55 -0700, Joe Perches <[email protected]> wrote:
> Add and use a convenience inline to get an irq by name.
> 
> Signed-off-by: Joe Perches <[email protected]>
> ---
> 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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to