Commit b1e675d1 authored by Lizhe's avatar Lizhe Committed by Takashi Iwai

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.
Signed-off-by: default avatarLizhe <sensor1010@163.com>
Link: https://lore.kernel.org/r/20230319044733.327091-1-sensor1010@163.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6aa9b1d0
...@@ -75,19 +75,8 @@ int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id, ...@@ -75,19 +75,8 @@ int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id,
} }
EXPORT_SYMBOL_GPL(snd_ac97_reset); 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 = { struct bus_type ac97_bus_type = {
.name = "ac97", .name = "ac97",
.match = ac97_bus_match,
}; };
static int __init ac97_bus_init(void) static int __init ac97_bus_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment