]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: fix driver built w/ w/o both pci and platf modules
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Thu, 7 Jun 2012 19:25:07 +0000 (19:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jun 2012 05:46:48 +0000 (22:46 -0700)
commitde0fd37b276a5db921e4484d3cd5747055a8f22d
treeaee97cf7c77d962610bd93c6cbabce071b36ac19
parent2b62fdb9099eb74380c8aaca7f9217bb5884f3ca
stmmac: fix driver built w/ w/o both pci and platf modules

The commit 42928dd1eb1963644 fixes the Kconfig of the
driver when built as module allowing to select/unselect
the PCI and Platform modules that are not anymore mutually
exclusive. This patch fixes and guarantees that the driver
builds on all the platforms w/ w/o PCI and when select/unselect
the two stmmac supports. In case of there are some problems
on both the configuration and the pci/pltf registration the
module_init will fail.

v2: set the CONFIG_STMMAC_PLATFORM enabled by default.
I've just noticed that this can actually help on
some configurations that don't enable any STMMAC
options by default (e.g. SPEAr).

v3: change printk level when do not register the driver.

Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/Kconfig
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c