Skip to contentSkip to conversation

net: macb: move pdata to private header

PATCH Applied Alexandre Belloni 2 participants 2 messages Sep 30, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: macb: move pdata to private header

struct macb_platform_data is only used by macb_pci to register the platform device, move its definition to cadence/macb.h and remove platform_data/macb.h

---
 drivers/net/ethernet/cadence/macb.h      | 11 +++++++++++
 drivers/net/ethernet/cadence/macb_main.c |  1 -
 drivers/net/ethernet/cadence/macb_pci.c  |  1 -
 include/linux/platform_data/macb.h       | 20 --------------------
 4 files changed, 11 insertions(+), 22 deletions(-)
 delete mode 100644 include/linux/platform_data/macb.h
drivers/net/ethernet/cadence/macb.h +11 -0
index 4f1b41569260..3fd5c6cc23af 100644
@@ -7,6 +7,7 @@
 #ifndef _MACB_H
 #define _MACB_H
 
+#include <linux/clk.h>
 #include <linux/phylink.h>
 #include <linux/ptp_clock_kernel.h>
 #include <linux/net_tstamp.h>
@@ -1298,4 +1299,14 @@ static inline bool gem_has_ptp(struct macb *bp)
 	return !!(bp->caps & MACB_CAPS_GEM_HAS_PTP);
 }
 
+/**
+ * struct macb_platform_data - platform data for MACB Ethernet used for PCI registration
+ * @pclk:		platform clock
+ * @hclk:		AHB clock
+ */
+struct macb_platform_data {
+	struct clk	*pclk;
+	struct clk	*hclk;
+};
+
 #endif /* _MACB_H */
drivers/net/ethernet/cadence/macb_main.c +0 -1
index f00ad73ea8e3..4b42b2d6398c 100644
@@ -23,7 +23,6 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/dma-mapping.h>
-#include <linux/platform_data/macb.h>
 #include <linux/platform_device.h>
 #include <linux/phylink.h>
 #include <linux/of.h>
drivers/net/ethernet/cadence/macb_pci.c +0 -1
index 35316c91f523..353393dea639 100644
@@ -13,7 +13,6 @@
 #include <linux/etherdevice.h>
 #include <linux/module.h>
 #include <linux/pci.h>
-#include <linux/platform_data/macb.h>
 #include <linux/platform_device.h>
 #include "macb.h"
 
include/linux/platform_data/macb.h deleted +0 -20
deleted file mode 100644
index aa5b5562d6f7..000000000000
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2004-2006 Atmel Corporation
- */
-#ifndef __MACB_PDATA_H__
-#define __MACB_PDATA_H__
-
-#include <linux/clk.h>
-
-/**
- * struct macb_platform_data - platform data for MACB Ethernet
- * @pclk:		platform clock
- * @hclk:		AHB clock
- */
-struct macb_platform_data {
-	struct clk	*pclk;
-	struct clk	*hclk;
-};
-
-#endif /* __MACB_PDATA_H__ */
Signature · 1 line
2.26.2
maintainer Applied
#1 lore raw

From: Alexandre Belloni <[email protected]>
Date: Wed, 30 Sep 2020 12:50:59 +0200

Quoted 4 lines

struct macb_platform_data is only used by macb_pci to register the platform device, move its definition to cadence/macb.h and remove platform_data/macb.h

Applied, thank you.