[PATCH v5 1/4] mfd: add syscon driver based on regmap
From: Andi Shyti <hidden>
Date: 2012-09-04 15:44:38
Also in:
linux-devicetree, lkml
On Tue, Sep 04, 2012 at 07:46:02PM +0800, Dong Aisheng wrote:
On Tue, Sep 04, 2012 at 07:35:45PM +0800, Andi Shyti wrote:quoted
Hi Dong, On Tue, Sep 04, 2012 at 11:20:08AM +0800, Dong Aisheng wrote:quoted
+static int __devinit syscon_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev;Do we really need this variable? Anyway you are using it only once in the dev_info.Okay, i can remove it.
On Tue, Sep 04, 2012 at 04:16:59PM +0400, Sergei Shtylyov wrote:
But Dong definitely could use it more than once, so it seems useful.
[sorry for pasting your e-mail here] yes, but he is using it only once and, it's easily reachable with pdev->dev and anyway Dong is using &pdev->dev.
quoted
quoted
+ + syscon = devm_kzalloc(&pdev->dev, sizeof(struct syscon), + GFP_KERNEL);in case of error you are not freeing syscon.Do we need it for managed resource of syscon?
Yes, you're right :)
quoted
Moreover, in my opinion, some dev_err more should not heart
^^ as Sergei points out is 'hurt'... mistype :)
There's no much error cases here, most of them rarely fails and i don't feel we really need add. I don't know what dev_err you suggested to add?
For example some failure cases, anyway i read quickly the code and I don't big see issues. Andi