lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Nov 2012 21:35:15 +0000
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Joe Perches <joe@...ches.com>, Sangho Yi <antiroot@...il.com>
Cc:	broonie@...nsource.wolfsonmicro.com, cbow@...l.ru,
	dwmw2@...adead.org, linux-kernel@...r.kernel.org,
	patches@...nsource.wolfsonmicro.com
Subject: Re: [PATCH] wm831x: Add and use a wm831x_irq_byname convenience function

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ