[PATCH 6/8] vfio/mdev: unexport mdev_bus_type
Tian, Kevin
kevin.tian at intel.com
Thu Jun 9 06:57:07 UTC 2022
> From: Christoph Hellwig
> Sent: Friday, June 3, 2022 2:33 PM
>
> mdev_bus_type is only used in mdev.ko now, so unexport it.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
Reviewed-by: Kevin Tian <kevin.tian at intel.com>
> ---
> drivers/vfio/mdev/mdev_driver.c | 1 -
> drivers/vfio/mdev/mdev_private.h | 1 +
> include/linux/mdev.h | 2 --
> 3 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/vfio/mdev/mdev_driver.c
> b/drivers/vfio/mdev/mdev_driver.c
> index 9c2af59809e2e..dde6adf23b1db 100644
> --- a/drivers/vfio/mdev/mdev_driver.c
> +++ b/drivers/vfio/mdev/mdev_driver.c
> @@ -47,7 +47,6 @@ struct bus_type mdev_bus_type = {
> .remove = mdev_remove,
> .match = mdev_match,
> };
> -EXPORT_SYMBOL_GPL(mdev_bus_type);
>
> /**
> * mdev_register_driver - register a new MDEV driver
> diff --git a/drivers/vfio/mdev/mdev_private.h
> b/drivers/vfio/mdev/mdev_private.h
> index 277819f1ebed8..3ecd6ae1dfa7c 100644
> --- a/drivers/vfio/mdev/mdev_private.h
> +++ b/drivers/vfio/mdev/mdev_private.h
> @@ -13,6 +13,7 @@
> int mdev_bus_register(void);
> void mdev_bus_unregister(void);
>
> +extern struct bus_type mdev_bus_type;
> extern const struct attribute_group *mdev_device_groups[];
>
> #define to_mdev_type_attr(_attr) \
> diff --git a/include/linux/mdev.h b/include/linux/mdev.h
> index 5811b5a52a511..f92b4d8edf0e8 100644
> --- a/include/linux/mdev.h
> +++ b/include/linux/mdev.h
> @@ -88,8 +88,6 @@ static inline const guid_t *mdev_uuid(struct
> mdev_device *mdev)
> return &mdev->uuid;
> }
>
> -extern struct bus_type mdev_bus_type;
> -
> int mdev_register_parent(struct mdev_parent *parent, struct device *dev,
> struct mdev_driver *mdev_driver);
> void mdev_unregister_parent(struct mdev_parent *parent);
> --
> 2.30.2
More information about the intel-gvt-dev
mailing list