diff options
author | Eddie James <eajames@linux.ibm.com> | 2023-06-12 22:56:46 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2023-08-09 09:13:27 +0300 |
commit | c21d322e1ae5e1e80384c949f24b761f6f2b6c67 (patch) | |
tree | 15ab4b529d6852b9a8b538d8ccf033f6d6a55461 /drivers/fsi/fsi-scom.c | |
parent | 21930d80ed4f76fea3d8773a6c4c8e6f57326fdd (diff) | |
download | linux-c21d322e1ae5e1e80384c949f24b761f6f2b6c67.tar.xz |
fsi: Use of_match_table for bus matching if specified
Since we have two scom drivers, use the standard of matching if
the driver specifies a table so that the right devices go to the
right driver.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230612195657.245125-4-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/fsi/fsi-scom.c')
-rw-r--r-- | drivers/fsi/fsi-scom.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c index bcb756dc9866..61dbda9dbe2b 100644 --- a/drivers/fsi/fsi-scom.c +++ b/drivers/fsi/fsi-scom.c @@ -10,6 +10,7 @@ #include <linux/cdev.h> #include <linux/delay.h> #include <linux/fs.h> +#include <linux/mod_devicetable.h> #include <linux/uaccess.h> #include <linux/slab.h> #include <linux/list.h> @@ -587,6 +588,12 @@ static int scom_remove(struct device *dev) return 0; } +static const struct of_device_id scom_of_ids[] = { + { .compatible = "ibm,fsi2pib" }, + { } +}; +MODULE_DEVICE_TABLE(of, scom_of_ids); + static const struct fsi_device_id scom_ids[] = { { .engine_type = FSI_ENGID_SCOM, @@ -600,6 +607,7 @@ static struct fsi_driver scom_drv = { .drv = { .name = "scom", .bus = &fsi_bus_type, + .of_match_table = scom_of_ids, .probe = scom_probe, .remove = scom_remove, } |