Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'devicetree-for-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree header detangling from Rob Herring:
"Remove the circular including of of_device.h and of_platform.h along
with all of their implicit includes.

This is the culmination of several kernel cycles worth of fixing
implicit DT includes throughout the tree"

* tag 'devicetree-for-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of: Stop circularly including of_device.h and of_platform.h
clk: qcom: gcc-x1e80100: Replace of_device.h with explicit includes
thermal: loongson2: Replace of_device.h with explicit includes
net: can: Use device_get_match_data()
sparc: Use device_get_match_data()

+30 -49
+5 -4
arch/sparc/kernel/pci_sabre.c
··· 13 13 #include <linux/export.h> 14 14 #include <linux/slab.h> 15 15 #include <linux/interrupt.h> 16 - #include <linux/of_device.h> 16 + #include <linux/of.h> 17 + #include <linux/of_platform.h> 18 + #include <linux/platform_device.h> 19 + #include <linux/property.h> 17 20 18 21 #include <asm/apb.h> 19 22 #include <asm/iommu.h> ··· 459 456 static const struct of_device_id sabre_match[]; 460 457 static int sabre_probe(struct platform_device *op) 461 458 { 462 - const struct of_device_id *match; 463 459 const struct linux_prom64_registers *pr_regs; 464 460 struct device_node *dp = op->dev.of_node; 465 461 struct pci_pbm_info *pbm; ··· 468 466 const u32 *vdma; 469 467 u64 clear_irq; 470 468 471 - match = of_match_device(sabre_match, &op->dev); 472 - hummingbird_p = match && (match->data != NULL); 469 + hummingbird_p = (uintptr_t)device_get_match_data(&op->dev); 473 470 if (!hummingbird_p) { 474 471 struct device_node *cpu_dp; 475 472
+7 -6
arch/sparc/kernel/pci_schizo.c
··· 11 11 #include <linux/slab.h> 12 12 #include <linux/export.h> 13 13 #include <linux/interrupt.h> 14 - #include <linux/of_device.h> 14 + #include <linux/of.h> 15 + #include <linux/of_platform.h> 16 + #include <linux/platform_device.h> 17 + #include <linux/property.h> 15 18 #include <linux/numa.h> 16 19 17 20 #include <asm/iommu.h> ··· 1462 1459 return err; 1463 1460 } 1464 1461 1465 - static const struct of_device_id schizo_match[]; 1466 1462 static int schizo_probe(struct platform_device *op) 1467 1463 { 1468 - const struct of_device_id *match; 1464 + unsigned long chip_type = (unsigned long)device_get_match_data(&op->dev); 1469 1465 1470 - match = of_match_device(schizo_match, &op->dev); 1471 - if (!match) 1466 + if (!chip_type) 1472 1467 return -EINVAL; 1473 - return __schizo_init(op, (unsigned long)match->data); 1468 + return __schizo_init(op, chip_type); 1474 1469 } 1475 1470 1476 1471 /* The ordering of this table is very important. Some Tomatillo
+2 -1
drivers/clk/qcom/gcc-x1e80100.c
··· 4 4 */ 5 5 6 6 #include <linux/clk-provider.h> 7 + #include <linux/mod_devicetable.h> 7 8 #include <linux/module.h> 8 - #include <linux/of_device.h> 9 + #include <linux/platform_device.h> 9 10 #include <linux/regmap.h> 10 11 11 12 #include <dt-bindings/clock/qcom,x1e80100-gcc.h>
+2 -11
drivers/net/can/c_can/c_can_platform.c
··· 30 30 #include <linux/io.h> 31 31 #include <linux/platform_device.h> 32 32 #include <linux/pm_runtime.h> 33 + #include <linux/property.h> 33 34 #include <linux/clk.h> 34 35 #include <linux/of.h> 35 - #include <linux/of_device.h> 36 36 #include <linux/mfd/syscon.h> 37 37 #include <linux/regmap.h> 38 38 ··· 259 259 void __iomem *addr; 260 260 struct net_device *dev; 261 261 struct c_can_priv *priv; 262 - const struct of_device_id *match; 263 262 struct resource *mem; 264 263 int irq; 265 264 struct clk *clk; 266 265 const struct c_can_driver_data *drvdata; 267 266 struct device_node *np = pdev->dev.of_node; 268 267 269 - match = of_match_device(c_can_of_table, &pdev->dev); 270 - if (match) { 271 - drvdata = match->data; 272 - } else if (pdev->id_entry->driver_data) { 273 - drvdata = (struct c_can_driver_data *) 274 - platform_get_device_id(pdev)->driver_data; 275 - } else { 276 - return -ENODEV; 277 - } 268 + drvdata = device_get_match_data(&pdev->dev); 278 269 279 270 /* get the appropriate clk */ 280 271 clk = devm_clk_get(&pdev->dev, NULL);
+2 -10
drivers/net/can/flexcan/flexcan-core.c
··· 23 23 #include <linux/module.h> 24 24 #include <linux/netdevice.h> 25 25 #include <linux/of.h> 26 - #include <linux/of_device.h> 27 26 #include <linux/pinctrl/consumer.h> 28 27 #include <linux/platform_device.h> 29 28 #include <linux/can/platform/flexcan.h> 30 29 #include <linux/pm_runtime.h> 30 + #include <linux/property.h> 31 31 #include <linux/regmap.h> 32 32 #include <linux/regulator/consumer.h> 33 33 ··· 2034 2034 2035 2035 static int flexcan_probe(struct platform_device *pdev) 2036 2036 { 2037 - const struct of_device_id *of_id; 2038 2037 const struct flexcan_devtype_data *devtype_data; 2039 2038 struct net_device *dev; 2040 2039 struct flexcan_priv *priv; ··· 2089 2090 if (IS_ERR(regs)) 2090 2091 return PTR_ERR(regs); 2091 2092 2092 - of_id = of_match_device(flexcan_of_match, &pdev->dev); 2093 - if (of_id) 2094 - devtype_data = of_id->data; 2095 - else if (platform_get_device_id(pdev)->driver_data) 2096 - devtype_data = (struct flexcan_devtype_data *) 2097 - platform_get_device_id(pdev)->driver_data; 2098 - else 2099 - return -ENODEV; 2093 + devtype_data = device_get_match_data(&pdev->dev); 2100 2094 2101 2095 if ((devtype_data->quirks & FLEXCAN_QUIRK_SUPPORT_FD) && 2102 2096 !((devtype_data->quirks &
+4 -4
drivers/net/can/mscan/mpc5xxx_can.c
··· 12 12 #include <linux/module.h> 13 13 #include <linux/interrupt.h> 14 14 #include <linux/platform_device.h> 15 + #include <linux/property.h> 15 16 #include <linux/netdevice.h> 16 17 #include <linux/can/dev.h> 18 + #include <linux/of.h> 17 19 #include <linux/of_address.h> 18 20 #include <linux/of_irq.h> 19 21 #include <linux/of_platform.h> ··· 292 290 int irq, mscan_clksrc = 0; 293 291 int err = -ENOMEM; 294 292 295 - data = of_device_get_match_data(&ofdev->dev); 293 + data = device_get_match_data(&ofdev->dev); 296 294 if (!data) 297 295 return -EINVAL; 298 296 ··· 353 351 354 352 static void mpc5xxx_can_remove(struct platform_device *ofdev) 355 353 { 356 - const struct of_device_id *match; 357 354 const struct mpc5xxx_can_data *data; 358 355 struct net_device *dev = platform_get_drvdata(ofdev); 359 356 struct mscan_priv *priv = netdev_priv(dev); 360 357 361 - match = of_match_device(mpc5xxx_can_table, &ofdev->dev); 362 - data = match ? match->data : NULL; 358 + data = device_get_match_data(&ofdev->dev); 363 359 364 360 unregister_mscandev(dev); 365 361 if (data && data->put_clock)
+3 -6
drivers/net/can/xilinx_can.c
··· 20 20 #include <linux/module.h> 21 21 #include <linux/netdevice.h> 22 22 #include <linux/of.h> 23 - #include <linux/of_device.h> 24 23 #include <linux/platform_device.h> 24 + #include <linux/property.h> 25 25 #include <linux/skbuff.h> 26 26 #include <linux/spinlock.h> 27 27 #include <linux/string.h> ··· 1726 1726 struct net_device *ndev; 1727 1727 struct xcan_priv *priv; 1728 1728 struct phy *transceiver; 1729 - const struct of_device_id *of_id; 1730 - const struct xcan_devtype_data *devtype = &xcan_axi_data; 1729 + const struct xcan_devtype_data *devtype; 1731 1730 void __iomem *addr; 1732 1731 int ret; 1733 1732 int rx_max, tx_max; ··· 1740 1741 goto err; 1741 1742 } 1742 1743 1743 - of_id = of_match_device(xcan_of_match, &pdev->dev); 1744 - if (of_id && of_id->data) 1745 - devtype = of_id->data; 1744 + devtype = device_get_match_data(&pdev->dev); 1746 1745 1747 1746 hw_tx_max_property = devtype->flags & XCAN_FLAG_TX_MAILBOXES ? 1748 1747 "tx-mailbox-count" : "tx-fifo-depth";
+2 -1
drivers/thermal/loongson2_thermal.c
··· 8 8 #include <linux/interrupt.h> 9 9 #include <linux/io.h> 10 10 #include <linux/minmax.h> 11 + #include <linux/mod_devicetable.h> 11 12 #include <linux/module.h> 12 - #include <linux/of_device.h> 13 13 #include <linux/platform_device.h> 14 + #include <linux/property.h> 14 15 #include <linux/thermal.h> 15 16 #include <linux/units.h> 16 17 #include "thermal_hwmon.h"
+1 -4
include/linux/of_device.h
··· 2 2 #ifndef _LINUX_OF_DEVICE_H 3 3 #define _LINUX_OF_DEVICE_H 4 4 5 - #include <linux/platform_device.h> 6 - #include <linux/of_platform.h> /* temporary until merge */ 7 - 8 - #include <linux/of.h> 5 + #include <linux/device/driver.h> 9 6 10 7 struct device; 11 8 struct of_device_id;
+2 -2
include/linux/of_platform.h
··· 7 7 */ 8 8 9 9 #include <linux/mod_devicetable.h> 10 - #include <linux/of_device.h> 11 - #include <linux/platform_device.h> 12 10 13 11 struct device; 12 + struct device_node; 14 13 struct of_device_id; 14 + struct platform_device; 15 15 16 16 /** 17 17 * struct of_dev_auxdata - lookup table entry for device names & platform_data