net: stmmac: move hardware setup for stmmac_open to new function
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Thu, 16 Jan 2014 10:52:14 +0000 (10:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2014 23:23:43 +0000 (15:23 -0800)
commit523f11b5d4fd72efb72b04cd7006bfd1d1d4f341
tree95b9f3d2f9d141dd409c691294e62d2e25a959a3
parent09f8d6960b69e474eef9d2aebdd0d536d00af0c8
net: stmmac: move hardware setup for stmmac_open to new function

This patch moves hardware setup part of the code in stmmac_open to a new
function stmmac_hw_setup, the reason for doing this is to make hw
initialization independent function so that PM functions can re-use it to
re-initialize the IP after returning from low power state.
This will also avoid code duplication across stmmac_resume/restore and
stmmac_open.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c