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, 17 Jun 2014 17:19:40 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Keerthy <j-keerthy@...com>
Cc:	linux-omap@...r.kernel.org, lgirdwood@...il.com,
	broonie@...nel.org, linux-kernel@...r.kernel.org,
	sameo@...ux.intel.com
Subject: Re: [PATCH 4/9] mfd: palmas: Add tps65917 support

> Add tps65917 PMIC support. tps65917 is a subset of palmas PMIC.
> Some of the register definitions and the interrupt mappings
> are different.
> 
> Signed-off-by: Keerthy <j-keerthy@...com>
> ---
>  drivers/mfd/palmas.c |  176 ++++++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 171 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
> index d280d78..485d755 100644
> --- a/drivers/mfd/palmas.c
> +++ b/drivers/mfd/palmas.c

[...]

> +struct palmas_driver_data {
> +	unsigned int *features;
> +	struct regmap_irq_chip *irq_chip;
> +};
> +
> +static struct palmas_driver_data palmas_data = {
> +	.features = &palmas_features,
> +	.irq_chip = &palmas_irq_chip,
> +};
> +
> +static struct palmas_driver_data tps659038_data = {
> +	.features = &tps659038_features,
> +	.irq_chip = &palmas_irq_chip,
> +};
> +
> +static struct palmas_driver_data tps65917_data = {
> +	.features = &tps659038_features,
> +	.irq_chip = &tps65917_irq_chip,
> +};
> +

[...]

> @@ -375,6 +539,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
>  {
>  	struct palmas *palmas;
>  	struct palmas_platform_data *pdata;
> +	struct palmas_driver_data *driver_data;
>  	struct device_node *node = i2c->dev.of_node;
>  	int ret = 0, i;
>  	unsigned int reg, addr, *features;
> @@ -408,7 +573,8 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
>  	if (!match)
>  		return -ENODATA;
>  
> -	features = (unsigned int *)match->data;
> +	driver_data = (struct palmas_driver_data *)match->data;
> +	features = (unsigned int *)driver_data->features;
>  	palmas->features = *features;

Couple of things a) I don't think the cast is required here and b) you
may as well do away with the local features variable here.

Just do:
  palmas->features = *driver_data->features;

Once fixed, re-submit with my:
  Acked-by: Lee Jones <lee.jones@...aro.org>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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