Skip to contentSkip to conversation

w1/w1.c : Remove driver match function

PATCH Applied Lizhe 2 participants 2 messages Mar 19, 2023 – May 8, 2023 W1 dallas's 1-wire bus

lore
Share & tools
lore

Lizhe

author
#0 lore raw

PATCH 1/1 w1/w1.c : Remove driver match function

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

---
 drivers/w1/w1.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/w1/w1.c +0 -6
index 9d199fed9628..e7e42f9dabf4 100644
@@ -58,11 +58,6 @@ MODULE_PARM_DESC(slave_ttl,
 DEFINE_MUTEX(w1_mlock);
 LIST_HEAD(w1_masters);
 
-static int w1_master_match(struct device *dev, struct device_driver *drv)
-{
-	return 1;
-}
-
 static int w1_master_probe(struct device *dev)
 {
 	return -ENODEV;
@@ -174,7 +169,6 @@ static int w1_uevent(const struct device *dev, struct kobj_uevent_env *env);
 
 static struct bus_type w1_bus_type = {
 	.name = "w1",
-	.match = w1_master_match,
 	.uevent = w1_uevent,
 };
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 8 lines · 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

[...]

Applied, thanks!

[1/1] w1/w1.c : Remove driver match function

      https://git.kernel.org/krzk/linux-w1/c/388f22fe5d91d707352b4b743368b30e21d9d9bf

Best regards,

Signature · 1 line
Krzysztof Kozlowski <[email protected]>