Re: [PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Krzysztof Kozlowski
On Thu, 2014-02-13 at 19:07 +, Mark Brown wrote: > On Thu, Feb 13, 2014 at 10:14:00AM +0100, Krzysztof Kozlowski wrote: > > > - for (i = 0; i < S2MPS11_REGULATOR_CNT; i++) > > + s2mps11->rdev = devm_kzalloc(>dev, > > + sizeof(*s2mps11->rdev)*rdev_num, GFP_KERNEL); > > +

Re: [PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Mark Brown
On Thu, Feb 13, 2014 at 10:14:00AM +0100, Krzysztof Kozlowski wrote: > - for (i = 0; i < S2MPS11_REGULATOR_CNT; i++) > + s2mps11->rdev = devm_kzalloc(>dev, > + sizeof(*s2mps11->rdev)*rdev_num, GFP_KERNEL); > + if (!s2mps11->rdev) > + return -ENOMEM; If

Re: [PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Krzysztof Kozlowski
On Thu, 2014-02-13 at 17:51 +0530, Yadwinder Singh Brar wrote: > Hi, > > On Thu, Feb 13, 2014 at 2:44 PM, Krzysztof Kozlowski > wrote: > > Add __initconst to 'regulator_desc' array with supported regulators. > > During probe choose how many and which regulators will be supported > > according to

Re: [PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Yadwinder Singh Brar
Hi, On Thu, Feb 13, 2014 at 2:44 PM, Krzysztof Kozlowski wrote: > Add __initconst to 'regulator_desc' array with supported regulators. > During probe choose how many and which regulators will be supported > according to device ID. Then copy the 'regulator_desc' array to > allocated memory so the

[PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Krzysztof Kozlowski
Add __initconst to 'regulator_desc' array with supported regulators. During probe choose how many and which regulators will be supported according to device ID. Then copy the 'regulator_desc' array to allocated memory so the regulator core can use it. Additionally allocate array of

[PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Krzysztof Kozlowski
Add __initconst to 'regulator_desc' array with supported regulators. During probe choose how many and which regulators will be supported according to device ID. Then copy the 'regulator_desc' array to allocated memory so the regulator core can use it. Additionally allocate array of

Re: [PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Yadwinder Singh Brar
Hi, On Thu, Feb 13, 2014 at 2:44 PM, Krzysztof Kozlowski k.kozlow...@samsung.com wrote: Add __initconst to 'regulator_desc' array with supported regulators. During probe choose how many and which regulators will be supported according to device ID. Then copy the 'regulator_desc' array to

Re: [PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Krzysztof Kozlowski
On Thu, 2014-02-13 at 17:51 +0530, Yadwinder Singh Brar wrote: Hi, On Thu, Feb 13, 2014 at 2:44 PM, Krzysztof Kozlowski k.kozlow...@samsung.com wrote: Add __initconst to 'regulator_desc' array with supported regulators. During probe choose how many and which regulators will be supported

Re: [PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Mark Brown
On Thu, Feb 13, 2014 at 10:14:00AM +0100, Krzysztof Kozlowski wrote: - for (i = 0; i S2MPS11_REGULATOR_CNT; i++) + s2mps11-rdev = devm_kzalloc(pdev-dev, + sizeof(*s2mps11-rdev)*rdev_num, GFP_KERNEL); + if (!s2mps11-rdev) + return -ENOMEM; If

Re: [PATCH v2 07/14] regulator: s2mps11: Copy supported regulators from initconst

2014-02-13 Thread Krzysztof Kozlowski
On Thu, 2014-02-13 at 19:07 +, Mark Brown wrote: On Thu, Feb 13, 2014 at 10:14:00AM +0100, Krzysztof Kozlowski wrote: - for (i = 0; i S2MPS11_REGULATOR_CNT; i++) + s2mps11-rdev = devm_kzalloc(pdev-dev, + sizeof(*s2mps11-rdev)*rdev_num, GFP_KERNEL); + if