All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] mfd: core: Preserve PLATFORM_DEVID_NONE
@ 2017-03-16 14:19 Andy Shevchenko
  2017-03-23 11:21 ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2017-03-16 14:19 UTC (permalink / raw)
  To: Lee Jones, linux-kernel; +Cc: Andy Shevchenko

There is a potential flaw if cell has id > 0 and is going to be
registered with PLATFORM_DEVID_NONE.

Ignore if PLATFORM_DEVID_NONE is supplied.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/mfd-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index c57e407020f1..c9583f895058 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -149,7 +149,7 @@ static int mfd_add_device(struct device *parent, int id,
 	int platform_id;
 	int r;
 
-	if (id == PLATFORM_DEVID_AUTO)
+	if (id < 0)
 		platform_id = id;
 	else
 		platform_id = id + cell->id;
-- 
2.11.0

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

end of thread, other threads:[~2017-03-27 12:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16 14:19 [PATCH v1] mfd: core: Preserve PLATFORM_DEVID_NONE Andy Shevchenko
2017-03-23 11:21 ` Lee Jones
2017-03-23 13:09   ` Andy Shevchenko
2017-03-24 11:35     ` Lee Jones
2017-03-26 12:53       ` Andy Shevchenko
2017-03-27 12:41         ` Lee Jones

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.