It is late on the day for platforms using platform data to pass
information to drivers. As of today, the only thing in the kernel
including the <linux/platform_data/mdio-gpio.h> file is the MDIO
GPIO driver itself.

Essentially it is exposing a kernel-internal interface unused by
any in-kernel code.

Let's decomission this and make the MDIO GPIO driver more
self-contained by starting to move this struct into the driver.

Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
 MAINTAINERS                             |  1 -
 drivers/net/phy/mdio-gpio.c             | 19 ++++++++++++++++++-
 include/linux/platform_data/mdio-gpio.h | 33 ---------------------------------
 3 files changed, 18 insertions(+), 35 deletions(-)
 delete mode 100644 include/linux/platform_data/mdio-gpio.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 3bdc260e36b7..e5a1a06c09e8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5333,7 +5333,6 @@ F:        include/linux/*mdio*.h
 F:     include/linux/of_net.h
 F:     include/linux/phy.h
 F:     include/linux/phy_fixed.h
-F:     include/linux/platform_data/mdio-gpio.h
 F:     include/linux/platform_data/mdio-bcm-unimac.h
 F:     include/trace/events/mdio.h
 F:     include/uapi/linux/mdio.h
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 4333c6e14742..6d669f24c0e6 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -24,12 +24,29 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/mdio-bitbang.h>
 #include <linux/gpio.h>
-#include <linux/platform_data/mdio-gpio.h>
 
 #include <linux/of_gpio.h>
 #include <linux/of_mdio.h>
 
+struct mdio_gpio_platform_data {
+       /* GPIO numbers for bus pins */
+       unsigned int mdc;
+       unsigned int mdio;
+       unsigned int mdo;
+
+       bool mdc_active_low;
+       bool mdio_active_low;
+       bool mdo_active_low;
+
+       u32 phy_mask;
+       u32 phy_ignore_ta_mask;
+       int irqs[PHY_MAX_ADDR];
+       /* reset callback */
+       int (*reset)(struct mii_bus *bus);
+};
+
 struct mdio_gpio_info {
        struct mdiobb_ctrl ctrl;
        struct gpio_desc *mdc, *mdio, *mdo;
diff --git a/include/linux/platform_data/mdio-gpio.h 
b/include/linux/platform_data/mdio-gpio.h
deleted file mode 100644
index 11f00cdabe3d..000000000000
--- a/include/linux/platform_data/mdio-gpio.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * MDIO-GPIO bus platform data structures
- *
- * Copyright (C) 2008, Paulius Zaleckas <paulius.zalec...@teltonika.lt>
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-
-#ifndef __LINUX_MDIO_GPIO_H
-#define __LINUX_MDIO_GPIO_H
-
-#include <linux/mdio-bitbang.h>
-
-struct mdio_gpio_platform_data {
-       /* GPIO numbers for bus pins */
-       unsigned int mdc;
-       unsigned int mdio;
-       unsigned int mdo;
-
-       bool mdc_active_low;
-       bool mdio_active_low;
-       bool mdo_active_low;
-
-       u32 phy_mask;
-       u32 phy_ignore_ta_mask;
-       int irqs[PHY_MAX_ADDR];
-       /* reset callback */
-       int (*reset)(struct mii_bus *bus);
-};
-
-#endif /* __LINUX_MDIO_GPIO_H */
-- 
2.14.3

Reply via email to