28 Jun 2012 04:58
[PATCH] can: flexcan: use of_property_read_u32 to avoid endian problem
Hui Wang <jason77.wang <at> gmail.com>
2012-06-28 02:58:57 GMT
2012-06-28 02:58:57 GMT
Use of_property_read_u32() to get DT value can avoid endian problems,
this is needed since this driver can run on powerpc (be) and arm (le).
No need to check ret value here since we will check the got value to
verify if users pass a valid value in the DT.
Cc: linux-can <at> vger.kernel.org
Cc: Marc Kleine-Budde <mkl <at> pengutronix.de>
Cc: David S. Miller <davem <at> davemloft.net>
Cc: Shawn Guo <shawn.guo <at> linaro.org>
Cc: Wolfgang Grandegger <wg <at> grandegger.com>
Signed-off-by: Hui Wang <jason77.wang <at> gmail.com>
---
This is the patch to replace the one "can: flexcan: use be32_to_cpup
to handle the value of dt entry", if you already applied that patch
and can't revert, please ignore this patch and let me know,i will
prepare an incremental patch basing on that one.
drivers/net/can/flexcan.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 38c0690..f63f826 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
<at> <at> -938,14 +938,9 <at> <at> static int __devinit flexcan_probe(struct platform_device *pdev)
if (IS_ERR(pinctrl))
return PTR_ERR(pinctrl);
- if (pdev->dev.of_node) {
(Continue reading)
RSS Feed