From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH v2 9/9] vfio: Add AMBA driver_override support Date: Mon, 19 Jun 2017 11:15:39 -0600 Message-ID: <20170619171539.14047.65171.stgit@gimli.home> References: <20170619170323.14047.26504.stgit@gimli.home> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: eric.auger@redhat.com, alex.williamson@redhat.com, linux-kernel@vger.kernel.org To: kvm@vger.kernel.org Return-path: In-Reply-To: <20170619170323.14047.26504.stgit@gimli.home> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org AMBA also supports driver_override, but amba_bustype was not exported to be able to identify an amba device. Signed-off-by: Alex Williamson --- drivers/vfio/vfio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index 20e57fecf652..36f0fcfded0b 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -36,6 +36,7 @@ #include #include #include +#include #define DRIVER_VERSION "0.3" #define DRIVER_AUTHOR "Alex Williamson " @@ -743,6 +744,11 @@ static char **vfio_find_driver_override(struct device *dev) } else if (dev->bus == &platform_bus_type) { struct platform_device *pdev = to_platform_device(dev); return &pdev->driver_override; +#ifdef CONFIG_ARM_AMBA + } else if (dev->bus == &amba_bustype) { + struct amba_device *adev = to_amba_device(dev); + return &adev->driver_override; +#endif } return NULL;