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:   Wed, 04 Apr 2018 13:08:15 +0100
From:   Jonathan Cameron <jic23@...23.retrosnub.co.uk>
To:     Bartosz Golaszewski <brgl@...ev.pl>,
        Daniel Mack <daniel@...que.org>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        Russell King <linux@...linux.org.uk>
CC:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] ARM: pxa: stargate2: use device properties for at24 eeprom



On 4 April 2018 12:47:06 BST, Bartosz Golaszewski <brgl@...ev.pl> wrote:
>We want to work towards phasing out the at24_platform_data structure.
>There are few users and its contents can be represented using generic
>device properties. Using device properties only will allow us to
>significantly simplify the at24 configuration code.
>
>Remove the at24_platform_data structure and replace it with an array
>of property entries. Drop the byte_len/size property, as the model name
>already implies the EEPROM's size.
>
>Signed-off-by: Bartosz Golaszewski <brgl@...ev.pl>
Looks sensible to me.

Acked-by: Jonathan Cameron <jonathan.cameron@...wei.com>

Will be a while before I can test but this looks safe enough..
>---
>NOTE: resending with correct e-mail address for Jonathan Cameron.
>
> arch/arm/mach-pxa/stargate2.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/arch/arm/mach-pxa/stargate2.c
>b/arch/arm/mach-pxa/stargate2.c
>index df62bb23dbee..bbea5fa9a140 100644
>--- a/arch/arm/mach-pxa/stargate2.c
>+++ b/arch/arm/mach-pxa/stargate2.c
>@@ -27,11 +27,11 @@
> 
> #include <linux/platform_data/i2c-pxa.h>
> #include <linux/platform_data/pcf857x.h>
>-#include <linux/platform_data/at24.h>
> #include <linux/smc91x.h>
> #include <linux/gpio/machine.h>
> #include <linux/gpio.h>
> #include <linux/leds.h>
>+#include <linux/property.h>
> 
> #include <asm/types.h>
> #include <asm/setup.h>
>@@ -795,9 +795,9 @@ static struct pcf857x_platform_data
>platform_data_pcf857x = {
> 	.context = NULL,
> };
> 
>-static struct at24_platform_data pca9500_eeprom_pdata = {
>-	.byte_len = 256,
>-	.page_size = 4,
>+static const struct property_entry pca9500_eeprom_properties[] = {
>+	PROPERTY_ENTRY_U32("pagesize", 4),
>+	{ }
> };
> 
> /**
>@@ -935,7 +935,7 @@ static struct i2c_board_info __initdata
>stargate2_i2c_board_info[] = {
> 	}, {
> 		.type = "24c02",
> 		.addr = 0x57,
>-		.platform_data = &pca9500_eeprom_pdata,
>+		.properties = pca9500_eeprom_properties,
> 	}, {
> 		.type = "max1238",
> 		.addr = 0x35,

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ