Skip to content

Commit

Permalink
sound: hda_phytium: Convert to platform remove callback returning void
Browse files Browse the repository at this point in the history
0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

Log:
sound/pci/hda/hda_phytium.c:1079:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
 1079 |         .remove = hda_ft_remove,
      |                   ^~~~~~~~~~~~~
sound/pci/hda/hda_phytium.c:1079:19: note: (near initialization for ‘ft_platform_hda.<anonymous>.remove’)
  • Loading branch information
opsiff authored and MingcongBai committed Nov 14, 2024
1 parent 9a6df52 commit df0be0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/pci/hda/hda_phytium.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ static int azx_probe_continue(struct azx *chip)
return err;
}

static int hda_ft_remove(struct platform_device *pdev)
static void hda_ft_remove(struct platform_device *pdev)
{
struct snd_card *card = dev_get_drvdata(&pdev->dev);
struct azx *chip;
Expand All @@ -1035,9 +1035,8 @@ static int hda_ft_remove(struct platform_device *pdev)
clear_bit(chip->dev_index, probed_devs);

snd_card_free(card);
return 0;
return;
}
return 0;
}

static void hda_ft_shutdown(struct platform_device *pdev)
Expand Down

0 comments on commit df0be0b

Please sign in to comment.