Skip to content

Commit

Permalink
usb: phytium: platform: 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/usb/phytium/platform.c:208:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  208 |         .remove = phytium_driver_remove,
      |                   ^~~~~~~~~~~~~~~~~~~~~
drivers/usb/phytium/platform.c:208:19: note: (near initialization for ‘phytium_otg_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored and MingcongBai committed Nov 14, 2024
1 parent 2d0795c commit 9a6df52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/usb/phytium/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ static int phytium_driver_probe(struct platform_device *pdev)
return retval;
}

static int phytium_driver_remove(struct platform_device *dev)
static void phytium_driver_remove(struct platform_device *dev)
{
struct phytium_cusb *config = platform_get_drvdata(dev);

if (!config)
return 0;
return;

phytium_get_dr_mode(config);

Expand All @@ -146,7 +146,6 @@ static int phytium_driver_remove(struct platform_device *dev)
phytium_gadget_uninit(config);

dev_set_drvdata(&dev->dev, NULL);
return 0;
}

static void phytium_driver_shutdown(struct platform_device *dev)
Expand Down

0 comments on commit 9a6df52

Please sign in to comment.