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:	Tue, 24 May 2011 12:44:57 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Dmitry Artamonow <mad_soft@...ox.ru>
Cc:	Mark Brown <broonie@...nsource.wolfsonmicro.com>, x86@...nel.org,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	alsa-devel@...a-project.org, linux-next@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	Harald Welte <laforge@...fiish.org>,
	Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [PATCH/RFC] gpio: add GPIOF_ values regardless on kconfig
 settings

On Tue, 24 May 2011 09:23:42 +0400 Dmitry Artamonow wrote:

> On 21:58 Mon 23 May     , Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@...cle.com>
> > 
> > Make GPIOF_ defined values available even when GPIOLIB nor GENERIC_GPIO
> > is enabled by moving them to <linux/gpio.h>.
> > 
> > Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
> 
> Looks good.
> 
> We probably may also want to move definition of struct gpio into
> include/linux/gpio.h to make things like this work as well:
> 
> static struct gpio some_gpios[] = {
> 	{ GPIO_BLAH, GPIOF_IN, "BLAH"},
> 	{ GPIO_BLAH2, GPIOF_OUT_INIT_LOW, "BLAH2"},
> };
> 
> static int some_init_function(void)
> {
> 	/* ... */
> 
> 	gpio_request_array(some_gpios, ARRAY_SIZE(some_gpios));
> 
> 	/* ... */
> }
> 
> These gpio_request_one() and gpio_request_array() are quite handy, so I
> suppose more and more drivers will use it as we go...

That could help this one:

linux-next-20110524/include/linux/mfd/tps65910.h:774: error: field 'gpio' has incomplete type

and then add some way to handle (e.g.):

	struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
=>
linux-next-20110524/drivers/gpio/tps65910-gpio.c:25: warning: type defaults to 'int' in declaration of '__mptr'


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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