diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2024-09-02 08:39:20 +0200 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-11-12 17:41:45 +0100 |
commit | ad8d1e323dd37f91d0c973e2a74c7b9054219adc (patch) | |
tree | 5f25f580f689794ebf0189a61c075a2407c206d4 /drivers/amba | |
parent | Linux 6.12-rc1 (diff) | |
download | linux-ad8d1e323dd37f91d0c973e2a74c7b9054219adc.tar.xz linux-ad8d1e323dd37f91d0c973e2a74c7b9054219adc.zip |
ARM: 9415/1: amba: Add dev_is_amba() function and export it for modules
Add dev_is_amba() function to determine
whether the device is a AMBA device.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/amba')
-rw-r--r-- | drivers/amba/bus.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 0230c43377c1..8ef259b4d037 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -449,6 +449,12 @@ const struct bus_type amba_bustype = { }; EXPORT_SYMBOL_GPL(amba_bustype); +bool dev_is_amba(const struct device *dev) +{ + return dev->bus == &amba_bustype; +} +EXPORT_SYMBOL_GPL(dev_is_amba); + static int __init amba_init(void) { return bus_register(&amba_bustype); |