diff mbox series

[01/42] mfd: arizona: use PLATFORM_DEVID_NONE

Message ID 20200921205016.20461-1-krzk@kernel.org
State New
Headers show
Series [01/42] mfd: arizona: use PLATFORM_DEVID_NONE | expand

Commit Message

Krzysztof Kozlowski Sept. 21, 2020, 8:49 p.m. UTC
Use PLATFORM_DEVID_NONE define instead of "-1" value because:
 - it brings some meaning,
 - it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/mfd/arizona-core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Florian Fainelli Sept. 21, 2020, 9:12 p.m. UTC | #1
On 9/21/20 1:49 PM, Krzysztof Kozlowski wrote:
> Use PLATFORM_DEVID_NONE define instead of "-1" value because:
>  - it brings some meaning,
>  - it might point attention why auto device ID was not used.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Alexandre Belloni Sept. 22, 2020, 6:49 a.m. UTC | #2
On 21/09/2020 22:49:38+0200, Krzysztof Kozlowski wrote:
> Use PLATFORM_DEVID_NONE define instead of "-1" value because:
>  - it brings some meaning,
>  - it might point attention why auto device ID was not used.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

> ---
>  drivers/mfd/atmel-hlcdc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c
> index 3c2414ba4b01..8ba13bc6fcf8 100644
> --- a/drivers/mfd/atmel-hlcdc.c
> +++ b/drivers/mfd/atmel-hlcdc.c
> @@ -129,7 +129,7 @@ static int atmel_hlcdc_probe(struct platform_device *pdev)
>  
>  	dev_set_drvdata(dev, hlcdc);
>  
> -	return devm_mfd_add_devices(dev, -1, atmel_hlcdc_cells,
> +	return devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, atmel_hlcdc_cells,
>  				    ARRAY_SIZE(atmel_hlcdc_cells),
>  				    NULL, 0, NULL);
>  }
> -- 
> 2.17.1
>
Andy Shevchenko Sept. 22, 2020, 8:22 a.m. UTC | #3
On Mon, Sep 21, 2020 at 11:54 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> Use PLATFORM_DEVID_NONE define instead of "-1" value because:
>  - it brings some meaning,
>  - it might point attention why auto device ID was not used.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/mfd/intel_msic.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c
> index bb24c2a07900..e9944a81dc44 100644
> --- a/drivers/mfd/intel_msic.c
> +++ b/drivers/mfd/intel_msic.c
> @@ -317,8 +317,9 @@ static int intel_msic_init_devices(struct intel_msic *msic)
>                 if (!pdata->irq[i])
>                         continue;
>
> -               ret = mfd_add_devices(&pdev->dev, -1, &msic_devs[i], 1, NULL,
> -                                     pdata->irq[i], NULL);
> +               ret = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE,
> +                                     &msic_devs[i], 1, NULL, pdata->irq[i],
> +                                     NULL);
>                 if (ret)
>                         goto fail;
>         }
> --
> 2.17.1
>
Charles Keepax Sept. 22, 2020, 8:48 a.m. UTC | #4
On Mon, Sep 21, 2020 at 10:49:35PM +0200, Krzysztof Kozlowski wrote:
> Use PLATFORM_DEVID_NONE define instead of "-1" value because:

>  - it brings some meaning,

>  - it might point attention why auto device ID was not used.

> 

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

> ---


Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>


Thanks,
Charles
Charles Keepax Sept. 22, 2020, 8:48 a.m. UTC | #5
On Mon, Sep 21, 2020 at 10:50:16PM +0200, Krzysztof Kozlowski wrote:
> Use PLATFORM_DEVID_NONE define instead of "-1" value because:

>  - it brings some meaning,

>  - it might point attention why auto device ID was not used.

> 

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

> ---


Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>


Thanks,
Charles
Adam Thomson Sept. 22, 2020, 9:04 a.m. UTC | #6
On 21 September 2020 21:50, Krzysztof Kozlowski wrote:

> Use PLATFORM_DEVID_NONE define instead of "-1" value because:
>  - it brings some meaning,
>  - it might point attention why auto device ID was not used.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Nicolas Saenz Julienne Sept. 22, 2020, 10:34 a.m. UTC | #7
On Mon, 2020-09-21 at 22:49 +0200, Krzysztof Kozlowski wrote:
> Use PLATFORM_DEVID_NONE define instead of "-1" value because:

>  - it brings some meaning,

>  - it might point attention why auto device ID was not used.

> 

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

> ---


Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>


>  drivers/mfd/bcm2835-pm.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c

> index 42fe67f1538e..a76014512bde 100644

> --- a/drivers/mfd/bcm2835-pm.c

> +++ b/drivers/mfd/bcm2835-pm.c

> @@ -44,7 +44,7 @@ static int bcm2835_pm_probe(struct platform_device *pdev)

>  	if (IS_ERR(pm->base))

>  		return PTR_ERR(pm->base);

>  

> -	ret = devm_mfd_add_devices(dev, -1,

> +	ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE,

>  				   bcm2835_pm_devs, ARRAY_SIZE(bcm2835_pm_devs),

>  				   NULL, 0, NULL);

>  	if (ret)

> @@ -60,7 +60,7 @@ static int bcm2835_pm_probe(struct platform_device *pdev)

>  		if (IS_ERR(pm->asb))

>  			return PTR_ERR(pm->asb);

>  

> -		ret = devm_mfd_add_devices(dev, -1,

> +		ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE,

>  					   bcm2835_power_devs,

>  					   ARRAY_SIZE(bcm2835_power_devs),

>  					   NULL, 0, NULL);
diff mbox series

Patch

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 000cb82023e3..bf48372db605 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -1043,8 +1043,9 @@  int arizona_dev_init(struct arizona *arizona)
 	case CS47L24:
 		break; /* No LDO1 regulator */
 	default:
-		ret = mfd_add_devices(arizona->dev, -1, early_devs,
-				      ARRAY_SIZE(early_devs), NULL, 0, NULL);
+		ret = mfd_add_devices(arizona->dev, PLATFORM_DEVID_NONE,
+				      early_devs, ARRAY_SIZE(early_devs),
+				      NULL, 0, NULL);
 		if (ret != 0) {
 			dev_err(dev, "Failed to add early children: %d\n", ret);
 			return ret;