Devicetree updates for v6.8, part 2:
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. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmWqn38ACgkQ+vtdtY28 YcO4Lw//Yyv0seoA6R/oLusSK/7eVj02GHHcAnEGwbGU4mjPhXnFAwnqfzxh/jZl cPZJYgTqOtPrGpDeWjwO1M9wIixR61MAxTOCbtP131kifCdie5V4mzdzer7li7yY Nnj0h+EL4UWLfX9ZmDOXmMcvgPiPmnmUvX+wlFdZhxdbbghfEwygQlc7pFBUCO2w iMOKPooqIkpn9Gh1Ko2n1zKdePAd9KEjWkanu7xWZNjDl8XIGIcSnSZ/zlgEc0Jm YqXGkJ8pAC6LEMcPqxgp2RtZKvV5ayPSoFRADNJnS4LQ0LZArAm7XkonmcYdZ6MG Nyo+M1nhYS0cgRn4oojgnobk1JWGM17OiK6rHxfbCrsex86zU+9NmOz/yvBbGcQ0 GBSXsfX+SXdmh2qY+OHMI9b8ThhsUJ8yJfcRghXrmyHA4R0FFj6IHFE69iUgF0LD usL8WxAgsx92sVp+yQbmQkNCiQ/MKtZV9kC/7IF8+74BgGa4eOBy7NmQQS7HKnAY 984llDgp4nUDyyvko4zBjB8Pg8coIWfBW9i1K5J0rIVJ2yLfBDY/A+uaCSiQbF1I r7gI/+0mSqxPQooSDGqidnSlqelLRSPxOgF0SPSKvj/wgQXTxlvxJ2GqKrv+/gYF e/tWj+Epvsuolx5YSbTcxjODb4QEzh3y296zNi2DouNE2YhLXGc= =JTXC -----END PGP SIGNATURE----- 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()
This commit is contained in:
commit
9bc44c51a0
@ -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;
|
||||
|
||||
|
@ -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 @@ out_err:
|
||||
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
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
@ -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 &
|
||||
|
@ -12,8 +12,10 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/can/dev.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
@ -290,7 +292,7 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
|
||||
int irq, mscan_clksrc = 0;
|
||||
int err = -ENOMEM;
|
||||
|
||||
data = of_device_get_match_data(&ofdev->dev);
|
||||
data = device_get_match_data(&ofdev->dev);
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
@ -351,13 +353,11 @@ exit_unmap_mem:
|
||||
|
||||
static void mpc5xxx_can_remove(struct platform_device *ofdev)
|
||||
{
|
||||
const struct of_device_id *match;
|
||||
const struct mpc5xxx_can_data *data;
|
||||
struct net_device *dev = platform_get_drvdata(ofdev);
|
||||
struct mscan_priv *priv = netdev_priv(dev);
|
||||
|
||||
match = of_match_device(mpc5xxx_can_table, &ofdev->dev);
|
||||
data = match ? match->data : NULL;
|
||||
data = device_get_match_data(&ofdev->dev);
|
||||
|
||||
unregister_mscandev(dev);
|
||||
if (data && data->put_clock)
|
||||
|
@ -20,8 +20,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/string.h>
|
||||
@ -1726,8 +1726,7 @@ static int xcan_probe(struct platform_device *pdev)
|
||||
struct net_device *ndev;
|
||||
struct xcan_priv *priv;
|
||||
struct phy *transceiver;
|
||||
const struct of_device_id *of_id;
|
||||
const struct xcan_devtype_data *devtype = &xcan_axi_data;
|
||||
const struct xcan_devtype_data *devtype;
|
||||
void __iomem *addr;
|
||||
int ret;
|
||||
int rx_max, tx_max;
|
||||
@ -1741,9 +1740,7 @@ static int xcan_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
of_id = of_match_device(xcan_of_match, &pdev->dev);
|
||||
if (of_id && of_id->data)
|
||||
devtype = of_id->data;
|
||||
devtype = device_get_match_data(&pdev->dev);
|
||||
|
||||
hw_tx_max_property = devtype->flags & XCAN_FLAG_TX_MAILBOXES ?
|
||||
"tx-mailbox-count" : "tx-fifo-depth";
|
||||
|
@ -8,9 +8,10 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/minmax.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/thermal.h>
|
||||
#include <linux/units.h>
|
||||
#include "thermal_hwmon.h"
|
||||
|
@ -2,10 +2,7 @@
|
||||
#ifndef _LINUX_OF_DEVICE_H
|
||||
#define _LINUX_OF_DEVICE_H
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_platform.h> /* temporary until merge */
|
||||
|
||||
#include <linux/of.h>
|
||||
#include <linux/device/driver.h>
|
||||
|
||||
struct device;
|
||||
struct of_device_id;
|
||||
|
@ -7,11 +7,11 @@
|
||||
*/
|
||||
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
struct device;
|
||||
struct device_node;
|
||||
struct of_device_id;
|
||||
struct platform_device;
|
||||
|
||||
/**
|
||||
* struct of_dev_auxdata - lookup table entry for device names & platform_data
|
||||
|
Loading…
x
Reference in New Issue
Block a user