Skip to contentSkip to conversation

ALSA:ac97: Remove redundant driver match function

PATCH In review Lizhe 2 participants 4 messages Mar 19, 2023 – Mar 20, 2023 Sound

lore
Share & tools
lore

Lizhe

author
#0 lore raw

PATCH 1/1 ALSA:ac97: Remove redundant 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.

---
 sound/ac97_bus.c | 11 -----------
 1 file changed, 11 deletions(-)
sound/ac97_bus.c +0 -11
index b4685c53ff11..c7aee8c42c55 100644
@@ -75,19 +75,8 @@ int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id,
 }
 EXPORT_SYMBOL_GPL(snd_ac97_reset);
 
-/*
- * Let drivers decide whether they want to support given codec from their
- * probe method. Drivers have direct access to the struct snd_ac97
- * structure and may  decide based on the id field amongst other things.
- */
-static int ac97_bus_match(struct device *dev, struct device_driver *drv)
-{
-	return 1;
-}
-
 struct bus_type ac97_bus_type = {
 	.name		= "ac97",
-	.match		= ac97_bus_match,
 };
 
 static int __init ac97_bus_init(void)
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.

Is Lizeh your real full name? (i.e. your name is "Li Zhe" ?) I'm asking because the Signed-off-by line is a legal requirement.

thanks,

Takashi

author
#2 lore raw

HI :
my name is li Zhe, I am Chinese

Quoted 18 lines · Takashi Iwai
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.

Is Lizeh your real full name? (i.e. your name is "Li Zhe" ?) I'm asking because the Signed-off-by line is a legal requirement.

thanks,

Takashi

#3 lore raw
Quoted 4 lines · lizhe

HI :
my name is li Zhe, I am Chinese

OK, then applied the patch now.

thanks,

Takashi

Quoted 21 lines
Quoted 18 lines · Takashi Iwai
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.

Is Lizeh your real full name? (i.e. your name is "Li Zhe" ?) I'm asking because the Signed-off-by line is a legal requirement.

thanks,

Takashi