diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2012-04-18 19:48:21 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-19 20:08:59 -0400 |
commit | 0f1f88a875bd6c6725501183fabeb99a70c35757 (patch) | |
tree | 9ac6a5af22c32206d0e23320f497f4e04fb41d7e /Kbuild | |
parent | 4bfcbd7abce2d9b56f10d455ffeab00584cd8045 (diff) |
stmmac: verify the dma_cfg platform fields
Recently the dma parameters that can be passed from the platform
have been moved from the plat_stmmacenet_data to the stmmac_dma_cfg.
In case of this new structure is not well allocated the driver can
fails. This is an example how this field is managed in ST platforms
static struct stmmac_dma_cfg gmac_dma_setting = {
.pbl = 32,
};
static struct plat_stmmacenet_data stih415_ethernet_platform_data[] = {
{
.dma_cfg = &gmac_dma_setting,
.has_gmac = 1,
[snip]
This patch so verifies that the dma_cfg passed from the platform.
In case of it is NULL there is no reason that the driver has to fail
and some default values can be passed. These are ok for all the
Synopsys chips and could impact on performances, only.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
cc: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions