mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] vfio/mdev: Remove redundant driver match function
@ 2023-03-19  5:01 Lizhe
  2023-03-19 14:18 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Lizhe @ 2023-03-19  5:01 UTC (permalink / raw)
  To: kwankhede, alex.williamson; +Cc: kvm, linux-kernel, Lizhe

If there is no driver match function, the driver core assumes that each
candidate pair (driver, device) matches, see driver_match_device().

Drop the bus's match function that always returned 1 and so
implements the same behaviour as when there is no match function.

Signed-off-by: Lizhe <sensor1010@163.com>
---
 drivers/vfio/mdev/mdev_driver.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c
index 7825d83a55f8..fafa4416aad9 100644
--- a/drivers/vfio/mdev/mdev_driver.c
+++ b/drivers/vfio/mdev/mdev_driver.c
@@ -31,20 +31,10 @@ static void mdev_remove(struct device *dev)
 		drv->remove(to_mdev_device(dev));
 }
 
-static int mdev_match(struct device *dev, struct device_driver *drv)
-{
-	/*
-	 * No drivers automatically match. Drivers are only bound by explicit
-	 * device_driver_attach()
-	 */
-	return 0;
-}
-
 struct bus_type mdev_bus_type = {
 	.name		= "mdev",
 	.probe		= mdev_probe,
 	.remove		= mdev_remove,
-	.match		= mdev_match,
 };
 
 /**
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-19 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19  5:01 [PATCH v1] vfio/mdev: Remove redundant driver match function Lizhe
2023-03-19 14:18 ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®