From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Cercueil Subject: Re: [PATCH v2 6/6] pwm: jz4740: Use __init_or_module and __exit for .probe and .remove Date: Sat, 08 Jun 2019 12:31:01 +0200 Message-ID: <1559989861.1815.10@crapouillou.net> References: <20190607154410.10633-1-paul@crapouillou.net> <20190607154410.10633-7-paul@crapouillou.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20190607154410.10633-7-paul@crapouillou.net> Sender: linux-kernel-owner@vger.kernel.org To: Thierry Reding , Rob Herring , Mark Rutland Cc: od@zcrc.me, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-pwm@vger.kernel.org I misunderstood what __init_or_module was for. Please ignore this patch (the rest of the patchset is OK). Sorry for the noise. Le ven. 7 juin 2019 =E0 17:44, Paul Cercueil a=20 =E9crit : > 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. >=20 > Signed-off-by: Paul Cercueil > --- >=20 > Notes: > v2: New patch >=20 > drivers/pwm/pwm-jz4740.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > 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 =3D { > .owner =3D THIS_MODULE, > }; >=20 > -static int jz4740_pwm_probe(struct platform_device *pdev) > +static int __init_or_module jz4740_pwm_probe(struct platform_device=20 > *pdev) > { > struct jz4740_pwm_chip *jz4740; >=20 > @@ -169,7 +169,7 @@ static int jz4740_pwm_probe(struct=20 > platform_device *pdev) > return pwmchip_add(&jz4740->chip); > } >=20 > -static int jz4740_pwm_remove(struct platform_device *pdev) > +static int __exit jz4740_pwm_remove(struct platform_device *pdev) > { > struct jz4740_pwm_chip *jz4740 =3D platform_get_drvdata(pdev); >=20 > -- > 2.21.0.593.g511ec345e18 >=20 =