]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: use of_property_read_u32 instead of read_u8
authorBhadram Varka <vbhadram@nvidia.com>
Thu, 2 Nov 2017 07:22:13 +0000 (12:52 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Nov 2017 05:15:06 +0000 (14:15 +0900)
commit8d2bb00125c190c2fb9fb9996c0830a3b399acef
tree5aa5da74e4cc208dd7136dce59cebe288e04850b
parentfb3cec8cadf81ea38ed3c100c2ff91552cd4b761
stmmac: use of_property_read_u32 instead of read_u8

Numbers in DT are stored in “cells” which are 32-bits
in size. of_property_read_u8 does not work properly
because of endianness problem.

This causes it to always return 0 with little-endian
architectures.

Fix it by using of_property_read_u32() OF API.

Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
include/linux/stmmac.h