Skip to content

Commit 7351324

Browse files
Dawei Litiwai
authored andcommitted
ALSA: ac97: make remove callback of ac97 driver void returned
Since commit fc7a620 ("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 <[email protected]> Link: https://lore.kernel.org/r/TYCP286MB2323A5AB1B2578EF4FA15DA7CAFB9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Takashi Iwai <[email protected]>
1 parent bea11f0 commit 7351324

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

drivers/mfd/wm97xx-core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,11 @@ static int wm97xx_ac97_probe(struct ac97_codec_device *adev)
319319
return ret;
320320
}
321321

322-
static int wm97xx_ac97_remove(struct ac97_codec_device *adev)
322+
static void wm97xx_ac97_remove(struct ac97_codec_device *adev)
323323
{
324324
struct wm97xx_priv *wm97xx = ac97_get_drvdata(adev);
325325

326326
snd_ac97_compat_release(wm97xx->ac97);
327-
328-
return 0;
329327
}
330328

331329
static const struct ac97_id wm97xx_ac97_ids[] = {

include/sound/ac97/codec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct ac97_codec_device {
6363
struct ac97_codec_driver {
6464
struct device_driver driver;
6565
int (*probe)(struct ac97_codec_device *);
66-
int (*remove)(struct ac97_codec_device *);
66+
void (*remove)(struct ac97_codec_device *dev);
6767
void (*shutdown)(struct ac97_codec_device *);
6868
const struct ac97_id *id_table;
6969
};

sound/ac97/bus.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,9 @@ static void ac97_bus_remove(struct device *dev)
524524
if (ret < 0)
525525
return;
526526

527-
ret = adrv->remove(adev);
527+
adrv->remove(adev);
528528
pm_runtime_put_noidle(dev);
529-
if (ret == 0)
530-
ac97_put_disable_clk(adev);
529+
ac97_put_disable_clk(adev);
531530

532531
pm_runtime_disable(dev);
533532
}

0 commit comments

Comments
 (0)