All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] of: Use PLATFORM_DEVID_NONE definition
@ 2017-08-25 15:33 Andy Shevchenko
       [not found] ` <20170825153313.60658-1-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2017-08-25 15:33 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Benjamin Gaignard,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Andy Shevchenko

Use dedicated definition instead of plain -1 where it's appropriate.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 drivers/of/device.c   | 2 +-
 drivers/of/platform.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/device.c b/drivers/of/device.c
index 6f33a0e0d351..8963ec8ea96f 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -58,7 +58,7 @@ int of_device_add(struct platform_device *ofdev)
 	/* name and id have to be set so that the platform bus doesn't get
 	 * confused on matching */
 	ofdev->name = dev_name(&ofdev->dev);
-	ofdev->id = -1;
+	ofdev->id = PLATFORM_DEVID_NONE;
 
 	/*
 	 * If this device has not binding numa node in devicetree, that is
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 683b2e74bef7..ac15d0e3d27d 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -118,7 +118,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
 	int rc, i, num_reg = 0, num_irq;
 	struct resource *res, temp_res;
 
-	dev = platform_device_alloc("", -1);
+	dev = platform_device_alloc("", PLATFORM_DEVID_NONE);
 	if (!dev)
 		return NULL;
 
-- 
2.14.1

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] of: Use PLATFORM_DEVID_NONE definition
       [not found] ` <20170825153313.60658-1-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2017-08-25 15:50   ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2017-08-25 15:50 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Frank Rowand, Benjamin Gaignard, devicetree-u79uwXL29TY76Z2rM5mHXA

On Fri, Aug 25, 2017 at 06:33:13PM +0300, Andy Shevchenko wrote:
> Use dedicated definition instead of plain -1 where it's appropriate.
> 
> No functional change intended.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> ---
>  drivers/of/device.c   | 2 +-
>  drivers/of/platform.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-25 15:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 15:33 [PATCH v1] of: Use PLATFORM_DEVID_NONE definition Andy Shevchenko
     [not found] ` <20170825153313.60658-1-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-25 15:50   ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.