This allows the probe function to be dropped after the kernel finished its initialization, in the case where the driver was not compiled as a module. Signed-off-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx> --- Notes: v2: New patch drivers/pwm/pwm-jz4740.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-jz4740.c b/drivers/pwm/pwm-jz4740.c index f901e8a0d33d..1b5077825721 100644 --- a/drivers/pwm/pwm-jz4740.c +++ b/drivers/pwm/pwm-jz4740.c @@ -145,7 +145,7 @@ static const struct pwm_ops jz4740_pwm_ops = { .owner = THIS_MODULE, }; -static int jz4740_pwm_probe(struct platform_device *pdev) +static int __init_or_module jz4740_pwm_probe(struct platform_device *pdev) { struct jz4740_pwm_chip *jz4740; @@ -169,7 +169,7 @@ static int jz4740_pwm_probe(struct platform_device *pdev) return pwmchip_add(&jz4740->chip); } -static int jz4740_pwm_remove(struct platform_device *pdev) +static int __exit jz4740_pwm_remove(struct platform_device *pdev) { struct jz4740_pwm_chip *jz4740 = platform_get_drvdata(pdev); -- 2.21.0.593.g511ec345e18