mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 10:30:25 +04:00
treewide: remove usage of of_device.h
of_device.h was used only for of_match_device. That is no longer used in most places so we can drop the extra header. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/23071 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
committed by
Jonas Jelonek
parent
31d7dd77c6
commit
076eefdc2c
@@ -1,26 +0,0 @@
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 02:36:31 +0800
|
||||
Subject: [PATCH] add missing header mod_devicetable.h
|
||||
|
||||
Fix compilation error:
|
||||
|
||||
/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ltq-ptm-vr9/ltq-ptm/ifxmips_ptm_vdsl.c:969:34: error: array type has incomplete element type 'struct of_device_id'
|
||||
969 | static const struct of_device_id ltq_ptm_match[] = {
|
||||
| ^~~~~~~~~~~~~
|
||||
/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ltq-ptm-vr9/ltq-ptm/ifxmips_ptm_vdsl.c:969:34: error: 'ltq_ptm_match' defined but not used [-Werror=unused-variable]
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
ifxmips_ptm_vdsl.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/ifxmips_ptm_vdsl.c
|
||||
+++ b/ifxmips_ptm_vdsl.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/mod_devicetable.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_net.h>
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 21:16:08 +0800
|
||||
Subject: [PATCH] add missing header "mod_devicetable.h"
|
||||
|
||||
Fix compilation error:
|
||||
|
||||
/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-ptm-danube/ltq-ptm/ifxmips_ptm_adsl.c:1433:34: error: array type has incomplete element type 'struct of_device_id'
|
||||
1433 | static const struct of_device_id ltq_ptm_match[] = {
|
||||
| ^~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
ifxmips_ptm_adsl.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/ifxmips_ptm_adsl.c
|
||||
+++ b/ifxmips_ptm_adsl.c
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/interrupt.h>
|
||||
+#include <linux/mod_devicetable.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_device.h>
|
||||
@@ -43,8 +43,8 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_net.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/capability.h>
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_net.h>
|
||||
|
||||
#include "ifxmips_ptm_vdsl.h"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <linux/led-class-multicolor.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <linux/led-class-multicolor.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <mfd/rb4xx-cpld.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/reset.h>
|
||||
|
||||
#define AR934X_NFC_DRIVER_NAME "ar934x-nand"
|
||||
@@ -1397,8 +1396,7 @@ static int ar934x_nfc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
nfc->parent = &pdev->dev;
|
||||
nfc->swap_dma = of_property_read_bool(pdev->dev.of_node,
|
||||
"qca,nand-swap-dma");
|
||||
nfc->swap_dma = device_property_present(&pdev->dev, "qca,nand-swap-dma");
|
||||
|
||||
nand = &nfc->nand_chip;
|
||||
mtd = nand_to_mtd(nand);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <linux/mtd/rawnand.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <mfd/rb4xx-cpld.h>
|
||||
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+obj-$(CONFIG_SND_RALINK_SOC_I2S) += snd-soc-ralink-i2s.o
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/ralink/ralink-i2s.c
|
||||
@@ -0,0 +1,921 @@
|
||||
@@ -0,0 +1,916 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
+ * Copyright (C) 2016 Michael Lee <igvtee@gmail.com>
|
||||
@@ -81,7 +81,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+#include <linux/regmap.h>
|
||||
+#include <linux/reset.h>
|
||||
+#include <linux/debugfs.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <sound/pcm_params.h>
|
||||
+#include <sound/dmaengine_pcm.h>
|
||||
+
|
||||
@@ -848,14 +847,13 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+
|
||||
+static int ralink_i2s_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ const struct of_device_id *match;
|
||||
+ struct device_node *np = pdev->dev.of_node;
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct resource *res;
|
||||
+ struct ralink_i2s *i2s;
|
||||
+ int irq, ret;
|
||||
+ u32 dma_req;
|
||||
+ struct rt_i2s_data *data;
|
||||
+ const struct rt_i2s_data *data;
|
||||
+
|
||||
+ i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL);
|
||||
+ if (!i2s)
|
||||
@@ -863,10 +861,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+
|
||||
+ i2s->dev = dev;
|
||||
+
|
||||
+ match = of_match_device(ralink_i2s_match_table, dev);
|
||||
+ if (!match)
|
||||
+ return -EINVAL;
|
||||
+ data = (struct rt_i2s_data *)match->data;
|
||||
+ data = of_device_get_match_data(dev);
|
||||
+ i2s->flags = data->flags;
|
||||
+ /* setup out 12Mhz refclk to codec as mclk */
|
||||
+ if (data->refclk_setup)
|
||||
|
||||
Reference in New Issue
Block a user