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>] [day] [month] [year] [list]
Date:	Thu, 24 May 2012 16:30:29 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Andrew Victor <linux@...im.org.za>,
	Nicolas Ferre <nicolas.ferre@...el.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
Cc:	Russell King <linux@....linux.org.uk>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] at91: set i2c_board_info.type to "ds1339" directly

The single element of the cpu9krea_i2c_devices array (of type struct
i2c_board_info) has its "type" member set twice. First to "rtc-ds1307"
(through the I2C_BOARD_INFO macro) and then directly to "ds1339". Just
set it (once and) directly to "ds1339" instead.

Signed-off-by: Paul Bolle <pebolle@...cali.nl>
---
0) This is just something I stumbled upon while researching a different
issue. (An unrelated board apparently uses a ds1307 compatible RTC but
the kernel doesn't see it. I hope to submit a patch for that issue one
of these days.)

1) Entirely untested. I'm unsure what toolchain is needed to compile
this and I am certain that I don't have this hardware.

2) This is apparently legal. Doesn't gcc issue a warning for this?

 arch/arm/mach-at91/board-cpu9krea.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c
index 5f3680e..f680755 100644
--- a/arch/arm/mach-at91/board-cpu9krea.c
+++ b/arch/arm/mach-at91/board-cpu9krea.c
@@ -281,8 +281,7 @@ static struct gpio_led cpu9krea_leds[] = {
 
 static struct i2c_board_info __initdata cpu9krea_i2c_devices[] = {
 	{
-		I2C_BOARD_INFO("rtc-ds1307", 0x68),
-		.type	= "ds1339",
+		I2C_BOARD_INFO("ds1339", 0x68),
 	},
 };
 
-- 
1.7.7.6

--
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