[PATCH net-next 1/2] net: mdio-gpio: remove linux/mdio-gpio.h

Bartosz Golaszewski posted 2 patches 3 weeks ago
[PATCH net-next 1/2] net: mdio-gpio: remove linux/mdio-gpio.h
Posted by Bartosz Golaszewski 3 weeks ago
The three defines from the linux/mdio-gpio.h header are only used in the
mdio-gpio module. There's no reason to have them in a public header.
Move them into the driver and remove mdio-gpio.h.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/net/mdio/mdio-gpio.c | 5 ++++-
 include/linux/mdio-gpio.h    | 9 ---------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mdio/mdio-gpio.c b/drivers/net/mdio/mdio-gpio.c
index 1cfd538b5105d9b0621572c22bc93dddef85d6f5..c993108898964bee9048a19c40e9de4e5c943b48 100644
--- a/drivers/net/mdio/mdio-gpio.c
+++ b/drivers/net/mdio/mdio-gpio.c
@@ -20,13 +20,16 @@
 #include <linux/gpio/consumer.h>
 #include <linux/interrupt.h>
 #include <linux/mdio-bitbang.h>
-#include <linux/mdio-gpio.h>
 #include <linux/module.h>
 #include <linux/of_mdio.h>
 #include <linux/platform_data/mdio-gpio.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
+#define MDIO_GPIO_MDC	0
+#define MDIO_GPIO_MDIO	1
+#define MDIO_GPIO_MDO	2
+
 struct mdio_gpio_info {
 	struct mdiobb_ctrl ctrl;
 	struct gpio_desc *mdc, *mdio, *mdo;
diff --git a/include/linux/mdio-gpio.h b/include/linux/mdio-gpio.h
deleted file mode 100644
index cea443a672cb4bc466b7844756aa6261fca864e2..0000000000000000000000000000000000000000
--- a/include/linux/mdio-gpio.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __LINUX_MDIO_GPIO_H
-#define __LINUX_MDIO_GPIO_H
-
-#define MDIO_GPIO_MDC	0
-#define MDIO_GPIO_MDIO	1
-#define MDIO_GPIO_MDO	2
-
-#endif

-- 
2.47.3
Re: [PATCH net-next 1/2] net: mdio-gpio: remove linux/mdio-gpio.h
Posted by Linus Walleij 2 weeks, 4 days ago
On Mon, Mar 16, 2026 at 11:04 AM Bartosz Golaszewski
<bartosz.golaszewski@oss.qualcomm.com> wrote:

> The three defines from the linux/mdio-gpio.h header are only used in the
> mdio-gpio module. There's no reason to have them in a public header.
> Move them into the driver and remove mdio-gpio.h.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

Thanks for cleaning up this.
Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij