[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140103074511.GA10680@core.coreip.homeip.net>
Date: Thu, 2 Jan 2014 23:45:11 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Xiubo Li <Li.Xiubo@...escale.com>
Cc: thierry.reding@...il.com, bpringlemeir@...ps.com,
linux-pwm@...r.kernel.org, grant.likely@...aro.org,
rob.herring@...xeda.com, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Alison Wang <b18965@...escale.com>,
Jingchang Lu <b35083@...escale.com>
Subject: Re: [PATCHv8 RFC] pwm: Add Freescale FTM PWM driver support
Hi Xiubo,
On Fri, Jan 03, 2014 at 01:24:21PM +0800, Xiubo Li wrote:
> +
> +static inline int fsl_pwm_calculate_default_ps(struct fsl_pwm_chip *fpc,
> + enum fsl_pwm_clk index)
> +{
Why do you declare this (and other module-local) function as inline?
It is usually better let compiler decide if given function should be
inlined or not.
[...]
> +
> +static int fsl_pwm_remove(struct platform_device *pdev)
> +{
> + struct fsl_pwm_chip *fpc = platform_get_drvdata(pdev);
> +
> + mutex_destroy(&fpc->lock);
> +
> + return pwmchip_remove(&fpc->chip);
fpc->lock will be used while pwmchip_remove() is running so you should
not be destroying it before calling pwmchip_remove(). It should probbaly
go into free() method or just drop it altogether.
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists