Skip to content

Commit

Permalink
char: ipmi: bt_bmc_phytium: Convert to platform remove callback retur…
Browse files Browse the repository at this point in the history
…ning void

0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

Log:
drivers/char/ipmi/bt_bmc_phytium.c:526:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  526 |         .remove = bt_bmc_remove,
      |                   ^~~~~~~~~~~~~
drivers/char/ipmi/bt_bmc_phytium.c:526:19: note: (near initialization for ‘bt_bmc_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored and MingcongBai committed Nov 14, 2024
1 parent ed36a0e commit 92103b7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/char/ipmi/bt_bmc_phytium.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,15 +500,13 @@ static int bt_bmc_probe(struct platform_device *pdev)
return 0;
}

static int bt_bmc_remove(struct platform_device *pdev)
static void bt_bmc_remove(struct platform_device *pdev)
{
struct bt_bmc *bt_bmc = dev_get_drvdata(&pdev->dev);

misc_deregister(&bt_bmc->miscdev);
if (!bt_bmc->irq)
del_timer_sync(&bt_bmc->poll_timer);

return 0;
}

static const struct of_device_id bt_bmc_match[] = {
Expand Down

0 comments on commit 92103b7

Please sign in to comment.