mirror of
https://github.com/torvalds/linux
synced 2024-10-06 19:34:19 +00:00
powerpc/fsl_msi: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231006214516.340589-1-robh@kernel.org
This commit is contained in:
parent
ad496f8f83
commit
89f17016a8
|
@ -11,9 +11,11 @@
|
||||||
#include <linux/msi.h>
|
#include <linux/msi.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
#include <linux/of.h>
|
||||||
#include <linux/of_address.h>
|
#include <linux/of_address.h>
|
||||||
#include <linux/of_irq.h>
|
#include <linux/of_irq.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/property.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/irqdomain.h>
|
#include <linux/irqdomain.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
|
@ -392,7 +394,6 @@ static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
|
||||||
static const struct of_device_id fsl_of_msi_ids[];
|
static const struct of_device_id fsl_of_msi_ids[];
|
||||||
static int fsl_of_msi_probe(struct platform_device *dev)
|
static int fsl_of_msi_probe(struct platform_device *dev)
|
||||||
{
|
{
|
||||||
const struct of_device_id *match;
|
|
||||||
struct fsl_msi *msi;
|
struct fsl_msi *msi;
|
||||||
struct resource res, msiir;
|
struct resource res, msiir;
|
||||||
int err, i, j, irq_index, count;
|
int err, i, j, irq_index, count;
|
||||||
|
@ -402,10 +403,7 @@ static int fsl_of_msi_probe(struct platform_device *dev)
|
||||||
u32 offset;
|
u32 offset;
|
||||||
struct pci_controller *phb;
|
struct pci_controller *phb;
|
||||||
|
|
||||||
match = of_match_device(fsl_of_msi_ids, &dev->dev);
|
features = device_get_match_data(&dev->dev);
|
||||||
if (!match)
|
|
||||||
return -EINVAL;
|
|
||||||
features = match->data;
|
|
||||||
|
|
||||||
printk(KERN_DEBUG "Setting up Freescale MSI support\n");
|
printk(KERN_DEBUG "Setting up Freescale MSI support\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue