Skip to content

Commit

Permalink
lpc: phytium-lpc-snoop: Convert to platform remove callback returning…
Browse files Browse the repository at this point in the history
… void

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

Log:
drivers/misc/phytium-lpc-snoop.c:317:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  317 |         .remove = phytium_lpc_snoop_remove,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/misc/phytium-lpc-snoop.c:317:19: note: (near initialization for ‘phytium_lpc_snoop_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored and MingcongBai committed Nov 14, 2024
1 parent 73f95be commit 2d0795c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/misc/phytium-lpc-snoop.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,13 @@ static int phytium_lpc_snoop_probe(struct platform_device *pdev)
return rc;
}

static int phytium_lpc_snoop_remove(struct platform_device *pdev)
static void phytium_lpc_snoop_remove(struct platform_device *pdev)
{
struct phytium_lpc_snoop *lpc_snoop = dev_get_drvdata(&pdev->dev);

/* Disable both snoop channels */
phytium_lpc_disable_snoop(lpc_snoop, 0);
phytium_lpc_disable_snoop(lpc_snoop, 1);

return 0;
}


Expand Down

0 comments on commit 2d0795c

Please sign in to comment.