Skip to content

Commit

Permalink
mailbox: phytium_mailbox: Convert to platform remove callback returni…
Browse files Browse the repository at this point in the history
…ng void

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


Log:
drivers/mailbox/phytium_mailbox.c:184:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  184 |         .remove = phytium_mbox_remove,
      |                   ^~~~~~~~~~~~~~~~~~~
drivers/mailbox/phytium_mailbox.c:184:19: note: (near initialization for ‘phytium_mbox_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored and MingcongBai committed Nov 14, 2024
1 parent a8c7693 commit fc030e4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mailbox/phytium_mailbox.c
Original file line number Diff line number Diff line change
@@ -170,13 +170,11 @@ static int phytium_mbox_probe(struct platform_device *pdev)
return err;
}

static int phytium_mbox_remove(struct platform_device *pdev)
static void phytium_mbox_remove(struct platform_device *pdev)
{
struct phytium_mbox *mbox = platform_get_drvdata(pdev);

mbox_controller_unregister(&mbox->mbox);

return 0;
}

static struct platform_driver phytium_mbox_driver = {

0 comments on commit fc030e4

Please sign in to comment.