diff mbox series

[net-next,RFC,4/5] r8152: merge header into source

Message ID 20221108153342.18979-5-albert.zhou.50@gmail.com
State New
Headers show
Series Update r8152 to version two | expand

Commit Message

Albert Zhou Nov. 8, 2022, 3:33 p.m. UTC
After commit 0d5072029433 ("r8152: remove backwards compatibility"), the
header r8152_compatibility.h is short enough to be merged into r8152.c;
in addition, the duplicated include <linux/acpi.h> was removed, as well
as the now unnecessary <linux/version.h>.

Signed-off-by: Albert Zhou <albert.zhou.50@gmail.com>
---
 drivers/net/usb/r8152.c               | 52 ++++++++++++++++++++++-
 drivers/net/usb/r8152_compatibility.h | 61 ---------------------------
 2 files changed, 51 insertions(+), 62 deletions(-)
 delete mode 100644 drivers/net/usb/r8152_compatibility.h
diff mbox series

Patch

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 85a3b2a7e83b..10dff6a88093 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -35,7 +35,57 @@ 
 #include <linux/suspend.h>
 #include <linux/atomic.h>
 #include <linux/acpi.h>
-#include "r8152_compatibility.h"
+
+#include <linux/init.h>
+#include <linux/in.h>
+
+#if defined(RTL8152_S5_WOL) && defined(CONFIG_PM)
+#include <linux/reboot.h>
+#endif /* defined(RTL8152_S5_WOL) && defined(CONFIG_PM) */
+
+#include <linux/mdio.h>
+#include <uapi/linux/mdio.h>
+
+#ifndef FALSE
+	#define TRUE	1
+	#define FALSE	0
+#endif
+
+enum rtl_cmd {
+	RTLTOOL_PLA_OCP_READ_DWORD = 0,
+	RTLTOOL_PLA_OCP_WRITE_DWORD,
+	RTLTOOL_USB_OCP_READ_DWORD,
+	RTLTOOL_USB_OCP_WRITE_DWORD,
+	RTLTOOL_PLA_OCP_READ,
+	RTLTOOL_PLA_OCP_WRITE,
+	RTLTOOL_USB_OCP_READ,
+	RTLTOOL_USB_OCP_WRITE,
+	RTLTOOL_USB_INFO,
+	RTL_ENABLE_USB_DIAG,
+	RTL_DISABLE_USB_DIAG,
+
+	RTLTOOL_INVALID
+};
+
+struct usb_device_info {
+	__u16		idVendor;
+	__u16		idProduct;
+	__u16		bcdDevice;
+	__u8		dev_addr[8];
+	char		devpath[16];
+};
+
+struct rtltool_cmd {
+	__u32	cmd;
+	__u32	offset;
+	__u32	byteen;
+	__u32	data;
+	void	*buf;
+	struct usb_device_info nic_info;
+	struct sockaddr ifru_addr;
+	struct sockaddr ifru_netmask;
+	struct sockaddr ifru_hwaddr;
+};
 
 /* Version Information */
 #define DRIVER_VERSION "v2.16.3 (2022/07/06)"
diff --git a/drivers/net/usb/r8152_compatibility.h b/drivers/net/usb/r8152_compatibility.h
deleted file mode 100644
index 5f3eca6ee9ec..000000000000
--- a/drivers/net/usb/r8152_compatibility.h
+++ /dev/null
@@ -1,61 +0,0 @@ 
-#ifndef LINUX_COMPATIBILITY_H
-#define LINUX_COMPATIBILITY_H
-
-/*
- * Definition and macro
- */
-
-#include <linux/init.h>
-#include <linux/version.h>
-#include <linux/in.h>
-#include <linux/acpi.h>
-
-#if defined(RTL8152_S5_WOL) && defined(CONFIG_PM)
-#include <linux/reboot.h>
-#endif /* defined(RTL8152_S5_WOL) && defined(CONFIG_PM) */
-
-#include <linux/mdio.h>
-#include <uapi/linux/mdio.h>
-
-#ifndef FALSE
-	#define TRUE	1
-	#define FALSE	0
-#endif
-
-enum rtl_cmd {
-	RTLTOOL_PLA_OCP_READ_DWORD = 0,
-	RTLTOOL_PLA_OCP_WRITE_DWORD,
-	RTLTOOL_USB_OCP_READ_DWORD,
-	RTLTOOL_USB_OCP_WRITE_DWORD,
-	RTLTOOL_PLA_OCP_READ,
-	RTLTOOL_PLA_OCP_WRITE,
-	RTLTOOL_USB_OCP_READ,
-	RTLTOOL_USB_OCP_WRITE,
-	RTLTOOL_USB_INFO,
-	RTL_ENABLE_USB_DIAG,
-	RTL_DISABLE_USB_DIAG,
-
-	RTLTOOL_INVALID
-};
-
-struct usb_device_info {
-	__u16		idVendor;
-	__u16		idProduct;
-	__u16		bcdDevice;
-	__u8		dev_addr[8];
-	char		devpath[16];
-};
-
-struct rtltool_cmd {
-	__u32	cmd;
-	__u32	offset;
-	__u32	byteen;
-	__u32	data;
-	void	*buf;
-	struct usb_device_info nic_info;
-	struct sockaddr ifru_addr;
-	struct sockaddr ifru_netmask;
-	struct sockaddr ifru_hwaddr;
-};
-
-#endif /* LINUX_COMPATIBILITY_H */