RE: [PATCHv8 RFC] pwm: Add Freescale FTM PWM driver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Dmitry,

> 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.
> 

Could the compiler know when the given function should be inlined by not declare it?
And when will be inlined ?

> [...]
> 
> > +
> > +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.
> 

Yes, I think I should drop it here as Thierry has already pointed out.


Thanks very much.

--
Best Regards,
Xiubo

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux