Skip to content

Commit

Permalink
media: platform: phytium_jpeg_core: Convert to platform remove callba…
Browse files Browse the repository at this point in the history
…ck returning void

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

Log:
drivers/media/platform/phytium/phytium_jpeg_core.c:1368:20: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
 1368 |         .remove =  phytium_jpeg_remove,
      |                    ^~~~~~~~~~~~~~~~~~~
drivers/media/platform/phytium/phytium_jpeg_core.c:1368:20: note: (near initialization for ‘phytium_jpeg_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored and MingcongBai committed Nov 14, 2024
1 parent 5cb4ec5 commit ed6a641
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/platform/phytium/phytium_jpeg_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ static int phytium_jpeg_probe(struct platform_device *pdev)
}

#define to_phytium_jpeg(x) container_of((x), struct phytium_jpeg_dev, v4l2_dev)
static int phytium_jpeg_remove(struct platform_device *pdev)
static void phytium_jpeg_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
Expand All @@ -1359,8 +1359,6 @@ static int phytium_jpeg_remove(struct platform_device *pdev)
v4l2_device_unregister(v4l2_dev);

of_reserved_mem_device_release(dev);

return 0;
}

static struct platform_driver phytium_jpeg_driver = {
Expand Down

0 comments on commit ed6a641

Please sign in to comment.