Skip to content

Commit 89f1701

Browse files
robherringmpe
authored andcommitted
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent ad496f8 commit 89f1701

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

arch/powerpc/sysdev/fsl_msi.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
#include <linux/msi.h>
1212
#include <linux/pci.h>
1313
#include <linux/slab.h>
14+
#include <linux/of.h>
1415
#include <linux/of_address.h>
1516
#include <linux/of_irq.h>
16-
#include <linux/of_platform.h>
17+
#include <linux/platform_device.h>
18+
#include <linux/property.h>
1719
#include <linux/interrupt.h>
1820
#include <linux/irqdomain.h>
1921
#include <linux/seq_file.h>
@@ -392,7 +394,6 @@ static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
392394
static const struct of_device_id fsl_of_msi_ids[];
393395
static int fsl_of_msi_probe(struct platform_device *dev)
394396
{
395-
const struct of_device_id *match;
396397
struct fsl_msi *msi;
397398
struct resource res, msiir;
398399
int err, i, j, irq_index, count;
@@ -402,10 +403,7 @@ static int fsl_of_msi_probe(struct platform_device *dev)
402403
u32 offset;
403404
struct pci_controller *phb;
404405

405-
match = of_match_device(fsl_of_msi_ids, &dev->dev);
406-
if (!match)
407-
return -EINVAL;
408-
features = match->data;
406+
features = device_get_match_data(&dev->dev);
409407

410408
printk(KERN_DEBUG "Setting up Freescale MSI support\n");
411409

0 commit comments

Comments
 (0)