Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: ac97: make remove callback of ac97 driver void returned

Since commit fc7a6209d571 ("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>

authored by

Dawei Li and committed by
Takashi Iwai
7351324c bea11f0a

+4 -7
+1 -3
drivers/mfd/wm97xx-core.c
··· 319 319 return ret; 320 320 } 321 321 322 - static int wm97xx_ac97_remove(struct ac97_codec_device *adev) 322 + static void wm97xx_ac97_remove(struct ac97_codec_device *adev) 323 323 { 324 324 struct wm97xx_priv *wm97xx = ac97_get_drvdata(adev); 325 325 326 326 snd_ac97_compat_release(wm97xx->ac97); 327 - 328 - return 0; 329 327 } 330 328 331 329 static const struct ac97_id wm97xx_ac97_ids[] = {
+1 -1
include/sound/ac97/codec.h
··· 63 63 struct ac97_codec_driver { 64 64 struct device_driver driver; 65 65 int (*probe)(struct ac97_codec_device *); 66 - int (*remove)(struct ac97_codec_device *); 66 + void (*remove)(struct ac97_codec_device *dev); 67 67 void (*shutdown)(struct ac97_codec_device *); 68 68 const struct ac97_id *id_table; 69 69 };
+2 -3
sound/ac97/bus.c
··· 524 524 if (ret < 0) 525 525 return; 526 526 527 - ret = adrv->remove(adev); 527 + adrv->remove(adev); 528 528 pm_runtime_put_noidle(dev); 529 - if (ret == 0) 530 - ac97_put_disable_clk(adev); 529 + ac97_put_disable_clk(adev); 531 530 532 531 pm_runtime_disable(dev); 533 532 }