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] [day] [month] [year] [list]
Date:	Thu, 05 Apr 2012 21:57:45 -0700
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Laxman Dewangan <ldewangan@...dia.com>,
	linus.walleij@...ricsson.com, sameo@...ux.intel.com,
	ldewangan@...dia.com
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V1 2/2] mfd: rc5t583: Initialize gpio during initialization.

On Wed,  4 Apr 2012 18:34:31 +0530, Laxman Dewangan <ldewangan@...dia.com> wrote:
> Initializing gpios of the device RICOH's PMIC RC5T583
> during device initialization. This device support 8 gpios
> which can be access through gpio library.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
> ---
>  drivers/mfd/Kconfig   |    1 +
>  drivers/mfd/rc5t583.c |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 29f463c..7155d5f 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -864,6 +864,7 @@ config MFD_RC5T583
>  	depends on I2C=y && GENERIC_HARDIRQS
>  	select MFD_CORE
>  	select REGMAP_I2C
> +	select GPIO_RC5T583

Don't select a symbol like this.  It gets enabled unconditionally even
if the GPIO_RC5T583 dependencies aren't met.

>  	help
>  	  Select this option to get support for the RICOH583 Power
>  	  Management system device.
> diff --git a/drivers/mfd/rc5t583.c b/drivers/mfd/rc5t583.c
> index 99ef944..a0c9e61 100644
> --- a/drivers/mfd/rc5t583.c
> +++ b/drivers/mfd/rc5t583.c
> @@ -331,6 +331,7 @@ static int __devinit rc5t583_i2c_probe(struct i2c_client *i2c,
>  		goto err_add_devs;
>  	}
>  
> +	rc5t583_gpio_init(rc5t583, pdata);

This looks wrong.  If you're going to do it this way, then just put
the GPIO bits directly into the driver and don't bother with the
separate file at all.  The point of mfd is to split up a driver and
allow each of the sub functions to be probed separately by the driver
model (and loaded as separate modules)

This looks wrong.  If you're going to do it this way, then just put
the GPIO bits directly into the driver and don't bother with the
separate file at all.  The point of mfd is to split up a driver and
allow each of the sub functions to be probed separately by the driver
model, and be loaded as separate modules.

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