Commit 9bc44c51 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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()
parents a638bfbf ef175b29
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -13,7 +13,10 @@
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/property.h>

#include <asm/apb.h>
#include <asm/iommu.h>
@@ -456,7 +459,6 @@ static void sabre_pbm_init(struct pci_pbm_info *pbm,
static const struct of_device_id sabre_match[];
static int sabre_probe(struct platform_device *op)
{
	const struct of_device_id *match;
	const struct linux_prom64_registers *pr_regs;
	struct device_node *dp = op->dev.of_node;
	struct pci_pbm_info *pbm;
@@ -466,8 +468,7 @@ static int sabre_probe(struct platform_device *op)
	const u32 *vdma;
	u64 clear_irq;

	match = of_match_device(sabre_match, &op->dev);
	hummingbird_p = match && (match->data != NULL);
	hummingbird_p = (uintptr_t)device_get_match_data(&op->dev);
	if (!hummingbird_p) {
		struct device_node *cpu_dp;

+7 −6
Original line number Diff line number Diff line
@@ -11,7 +11,10 @@
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/numa.h>

#include <asm/iommu.h>
@@ -1459,15 +1462,13 @@ static int __schizo_init(struct platform_device *op, unsigned long chip_type)
	return err;
}

static const struct of_device_id schizo_match[];
static int schizo_probe(struct platform_device *op)
{
	const struct of_device_id *match;
	unsigned long chip_type = (unsigned long)device_get_match_data(&op->dev);

	match = of_match_device(schizo_match, &op->dev);
	if (!match)
	if (!chip_type)
		return -EINVAL;
	return __schizo_init(op, (unsigned long)match->data);
	return __schizo_init(op, chip_type);
}

/* The ordering of this table is very important.  Some Tomatillo
+2 −1
Original line number Diff line number Diff line
@@ -4,8 +4,9 @@
 */

#include <linux/clk-provider.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#include <dt-bindings/clock/qcom,x1e80100-gcc.h>
+2 −11
Original line number Diff line number Diff line
@@ -30,9 +30,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/clk.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>

@@ -259,22 +259,13 @@ static int c_can_plat_probe(struct platform_device *pdev)
	void __iomem *addr;
	struct net_device *dev;
	struct c_can_priv *priv;
	const struct of_device_id *match;
	struct resource *mem;
	int irq;
	struct clk *clk;
	const struct c_can_driver_data *drvdata;
	struct device_node *np = pdev->dev.of_node;

	match = of_match_device(c_can_of_table, &pdev->dev);
	if (match) {
		drvdata = match->data;
	} else if (pdev->id_entry->driver_data) {
		drvdata = (struct c_can_driver_data *)
			platform_get_device_id(pdev)->driver_data;
	} else {
		return -ENODEV;
	}
	drvdata = device_get_match_data(&pdev->dev);

	/* get the appropriate clk */
	clk = devm_clk_get(&pdev->dev, NULL);
+2 −10
Original line number Diff line number Diff line
@@ -23,11 +23,11 @@
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/can/platform/flexcan.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>

@@ -2034,7 +2034,6 @@ MODULE_DEVICE_TABLE(platform, flexcan_id_table);

static int flexcan_probe(struct platform_device *pdev)
{
	const struct of_device_id *of_id;
	const struct flexcan_devtype_data *devtype_data;
	struct net_device *dev;
	struct flexcan_priv *priv;
@@ -2090,14 +2089,7 @@ static int flexcan_probe(struct platform_device *pdev)
	if (IS_ERR(regs))
		return PTR_ERR(regs);

	of_id = of_match_device(flexcan_of_match, &pdev->dev);
	if (of_id)
		devtype_data = of_id->data;
	else if (platform_get_device_id(pdev)->driver_data)
		devtype_data = (struct flexcan_devtype_data *)
			platform_get_device_id(pdev)->driver_data;
	else
		return -ENODEV;
	devtype_data = device_get_match_data(&pdev->dev);

	if ((devtype_data->quirks & FLEXCAN_QUIRK_SUPPORT_FD) &&
	    !((devtype_data->quirks &
Loading