lkml.org 
[lkml]   [2017]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] mfd: core: Preserve PLATFORM_DEVID_NONE
On Thu, 16 Mar 2017, Andy Shevchenko wrote:

> 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.

This is a substantial change to a pretty tried and tested piece of
sub-system code. Can you put some more meat on the bones in the
commit log, and include examples.

> 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;

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

\
 
 \ /
  Last update: 2017-03-23 12:23    [W:0.055 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site