mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
ALSA: ac97: make remove callback of ac97 driver void returned
Since commit fc7a6209d5
("bus: Make remove callback return void")
forces bus_type::remove be void-returned, it doesn't make much sense
for any bus based driver implementing remove callbalk to return
non-void to its caller.
As such, change the remove function for ac97 based drivers to return
void.
Signed-off-by: Dawei Li <set_pte_at@outlook.com>
Link: https://lore.kernel.org/r/TYCP286MB2323A5AB1B2578EF4FA15DA7CAFB9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
bea11f0aa1
commit
7351324c6f
3 changed files with 4 additions and 7 deletions
|
@ -319,13 +319,11 @@ err_free_compat:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wm97xx_ac97_remove(struct ac97_codec_device *adev)
|
static void wm97xx_ac97_remove(struct ac97_codec_device *adev)
|
||||||
{
|
{
|
||||||
struct wm97xx_priv *wm97xx = ac97_get_drvdata(adev);
|
struct wm97xx_priv *wm97xx = ac97_get_drvdata(adev);
|
||||||
|
|
||||||
snd_ac97_compat_release(wm97xx->ac97);
|
snd_ac97_compat_release(wm97xx->ac97);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct ac97_id wm97xx_ac97_ids[] = {
|
static const struct ac97_id wm97xx_ac97_ids[] = {
|
||||||
|
|
|
@ -63,7 +63,7 @@ struct ac97_codec_device {
|
||||||
struct ac97_codec_driver {
|
struct ac97_codec_driver {
|
||||||
struct device_driver driver;
|
struct device_driver driver;
|
||||||
int (*probe)(struct ac97_codec_device *);
|
int (*probe)(struct ac97_codec_device *);
|
||||||
int (*remove)(struct ac97_codec_device *);
|
void (*remove)(struct ac97_codec_device *dev);
|
||||||
void (*shutdown)(struct ac97_codec_device *);
|
void (*shutdown)(struct ac97_codec_device *);
|
||||||
const struct ac97_id *id_table;
|
const struct ac97_id *id_table;
|
||||||
};
|
};
|
||||||
|
|
|
@ -524,10 +524,9 @@ static void ac97_bus_remove(struct device *dev)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = adrv->remove(adev);
|
adrv->remove(adev);
|
||||||
pm_runtime_put_noidle(dev);
|
pm_runtime_put_noidle(dev);
|
||||||
if (ret == 0)
|
ac97_put_disable_clk(adev);
|
||||||
ac97_put_disable_clk(adev);
|
|
||||||
|
|
||||||
pm_runtime_disable(dev);
|
pm_runtime_disable(dev);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue