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]
Message-ID: <1294988000-20232-1-git-send-email-shawn.guo@freescale.com>
Date:	Fri, 14 Jan 2011 14:53:20 +0800
From:	Shawn Guo <shawn.guo@...escale.com>
To:	<davem@...emloft.net>, <gerg@...pgear.com>, <baruch@...s.co.il>,
	<eric@...rea.com>, <bryan.wu@...onical.com>,
	<r64343@...escale.com>, <B32542@...escale.com>,
	<lw@...o-electronics.de>, <w.sang@...gutronix.de>,
	<s.hauer@...gutronix.de>, <jamie@...ieiles.com>,
	<jamie@...reable.org>, <netdev@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
CC:	Shawn Guo <shawn.guo@...escale.com>
Subject: [PATCH] ARM: mxs: pass fec device name via platform data

Signed-off-by: Shawn Guo <shawn.guo@...escale.com>
---
 arch/arm/mach-mxs/devices/platform-fec.c        |   11 ++++++-----
 arch/arm/mach-mxs/include/mach/devices-common.h |    1 +
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-mxs/devices/platform-fec.c b/arch/arm/mach-mxs/devices/platform-fec.c
index c42dff7..75eb26b 100644
--- a/arch/arm/mach-mxs/devices/platform-fec.c
+++ b/arch/arm/mach-mxs/devices/platform-fec.c
@@ -10,20 +10,21 @@
 #include <mach/mx28.h>
 #include <mach/devices-common.h>
 
-#define mxs_fec_data_entry_single(soc, _id)				\
+#define mxs_fec_data_entry_single(soc, _devid, _id)			\
 	{								\
+		.devid = _devid,					\
 		.id = _id,						\
 		.iobase = soc ## _ENET_MAC ## _id ## _BASE_ADDR,	\
 		.irq = soc ## _INT_ENET_MAC ## _id,			\
 	}
 
-#define mxs_fec_data_entry(soc, _id)					\
-	[_id] = mxs_fec_data_entry_single(soc, _id)
+#define mxs_fec_data_entry(soc, _devid, _id)				\
+	[_id] = mxs_fec_data_entry_single(soc, _devid, _id)
 
 #ifdef CONFIG_SOC_IMX28
 const struct mxs_fec_data mx28_fec_data[] __initconst = {
 #define mx28_fec_data_entry(_id)					\
-	mxs_fec_data_entry(MX28, _id)
+	mxs_fec_data_entry(MX28, "imx28-fec", _id)
 	mx28_fec_data_entry(0),
 	mx28_fec_data_entry(1),
 };
@@ -45,6 +46,6 @@ struct platform_device *__init mxs_add_fec(
 		},
 	};
 
-	return mxs_add_platform_device("imx28-fec", data->id,
+	return mxs_add_platform_device(data->devid, data->id,
 			res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
 }
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h
index 6c3d1a1..10fbcfd 100644
--- a/arch/arm/mach-mxs/include/mach/devices-common.h
+++ b/arch/arm/mach-mxs/include/mach/devices-common.h
@@ -33,6 +33,7 @@ int __init mxs_add_duart(const struct amba_device *dev);
 /* fec */
 #include <linux/fec.h>
 struct mxs_fec_data {
+	const char *devid;
 	int id;
 	resource_size_t iobase;
 	resource_size_t iosize;
-- 
1.7.1


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ