linux-next: manual merge of the akpm tree with the net tree

From: Stephen Rothwell
Date: Tue Jun 12 2012 - 00:08:05 EST


Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
drivers/net/ethernet/stmicro/stmmac/stmmac.h between commit 33d5e332b9c5
("stmmac: fix driver built w/ w/o both pci and platf modules") from the
net tree and commit "net/stmmac: remove conditional compilation of clk
code" from the akpm tree.

Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 94b21b4,8e1a43b..0000000
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@@ -104,99 -103,3 +102,59 @@@ int stmmac_dvr_remove(struct net_devic
struct stmmac_priv *stmmac_dvr_probe(struct device *device,
struct plat_stmmacenet_data *plat_dat,
void __iomem *addr);
+
- #ifdef CONFIG_HAVE_CLK
- static inline int stmmac_clk_enable(struct stmmac_priv *priv)
- {
- if (!IS_ERR(priv->stmmac_clk))
- return clk_enable(priv->stmmac_clk);
-
- return 0;
- }
-
- static inline void stmmac_clk_disable(struct stmmac_priv *priv)
- {
- if (IS_ERR(priv->stmmac_clk))
- return;
-
- clk_disable(priv->stmmac_clk);
- }
- static inline int stmmac_clk_get(struct stmmac_priv *priv)
- {
- priv->stmmac_clk = clk_get(priv->device, NULL);
-
- if (IS_ERR(priv->stmmac_clk))
- return PTR_ERR(priv->stmmac_clk);
-
- return 0;
- }
- #else
- static inline int stmmac_clk_enable(struct stmmac_priv *priv)
- {
- return 0;
- }
- static inline void stmmac_clk_disable(struct stmmac_priv *priv)
- {
- }
- static inline int stmmac_clk_get(struct stmmac_priv *priv)
- {
- return 0;
- }
- #endif /* CONFIG_HAVE_CLK */
-
-
+#ifdef CONFIG_STMMAC_PLATFORM
+extern struct platform_driver stmmac_pltfr_driver;
+static inline int stmmac_register_platform(void)
+{
+ int err;
+
+ err = platform_driver_register(&stmmac_pltfr_driver);
+ if (err)
+ pr_err("stmmac: failed to register the platform driver\n");
+
+ return err;
+}
+static inline void stmmac_unregister_platform(void)
+{
+ platform_driver_register(&stmmac_pltfr_driver);
+}
+#else
+static inline int stmmac_register_platform(void)
+{
+ pr_debug("stmmac: do not register the platf driver\n");
+
+ return -EINVAL;
+}
+static inline void stmmac_unregister_platform(void)
+{
+}
+#endif /* CONFIG_STMMAC_PLATFORM */
+
+#ifdef CONFIG_STMMAC_PCI
+extern struct pci_driver stmmac_pci_driver;
+static inline int stmmac_register_pci(void)
+{
+ int err;
+
+ err = pci_register_driver(&stmmac_pci_driver);
+ if (err)
+ pr_err("stmmac: failed to register the PCI driver\n");
+
+ return err;
+}
+static inline void stmmac_unregister_pci(void)
+{
+ pci_unregister_driver(&stmmac_pci_driver);
+}
+#else
+static inline int stmmac_register_pci(void)
+{
+ pr_debug("stmmac: do not register the PCI driver\n");
+
+ return -EINVAL;
+}
+static inline void stmmac_unregister_pci(void)
+{
+}
+#endif /* CONFIG_STMMAC_PCI */

Attachment: pgp00000.pgp
Description: PGP signature