Skip to content

Commit

Permalink
char: ipmi_si_ls2k500: convert to the .remove_new (void) callback
Browse files Browse the repository at this point in the history
With commit 74a5b94 ("ARM: Convert to platform remove callback
returning void"), the .remove() callback for platform drivers was
refactored into void (previously int), with the callback renamed as
.remove_new().

Follow the commit and refactor this driver.

Signed-off-by: Mingcong Bai <[email protected]>
  • Loading branch information
MingcongBai authored and Avenger-285714 committed Dec 11, 2024
1 parent c833802 commit 03ebd62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions drivers/char/ipmi/ipmi_si_ls2k500.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,9 @@ static int of_ipmi_ls2k500_probe(struct platform_device *pdev)
return rv;
}

static int ipmi_ls2k500_remove(struct platform_device *pdev)
static void ipmi_ls2k500_remove(struct platform_device *pdev)
{
ipmi_si_remove_by_dev(&pdev->dev);

return 0;
}

#define LS2K500_SI_DEVICE_NAME "ipmi_ls2k500_si"
Expand All @@ -150,7 +148,7 @@ struct platform_driver ipmi_ls2k500_platform_driver = {
.name = LS2K500_SI_DEVICE_NAME,
},
.probe = of_ipmi_ls2k500_probe,
.remove = ipmi_ls2k500_remove,
.remove_new = ipmi_ls2k500_remove,
};

static bool platform_registered;
Expand Down
4 changes: 1 addition & 3 deletions drivers/video/fbdev/ls2k500sfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,14 +627,12 @@ static int simplefb_probe(struct platform_device *pdev)
return ret;
}

static int simplefb_remove(struct platform_device *pdev)
static void simplefb_remove(struct platform_device *pdev)
{
struct fb_info *info = platform_get_drvdata(pdev);

unregister_framebuffer(info);
framebuffer_release(info);

return 0;
}

static struct platform_driver simplefb_driver = {
Expand Down

0 comments on commit 03ebd62

Please sign in to comment.