All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Johan Hovold <johan@kernel.org>
Cc: Lee Jones <lee.jones@linaro.org>,
	Support Opensource <support.opensource@diasemi.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, Milo Kim <milo.kim@ti.com>,
	patches@opensource.wolfsonmicro.com,
	Fabio Estevam <fabio.estevam@freescale.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH 2/2] mfd: core: fix platform-device name collisions
Date: Wed, 25 Mar 2015 13:02:36 +0100	[thread overview]
Message-ID: <8499203.iFuRDWiNfB@amdc1032> (raw)
In-Reply-To: <1427281625-31241-2-git-send-email-johan@kernel.org>


Hi,

On Wednesday, March 25, 2015 12:07:05 PM Johan Hovold wrote:
> Since commit 6e3f62f0793e ("mfd: core: Fix platform-device id
> generation") we honour PLATFORM_DEVID_AUTO and PLATFORM_DEVID_NONE when
> registering mfd-devices.
> 
> Unfortunately, some mfd-drivers rely on the old behaviour of generating
> platform-device ids by adding the cell id also to the special value of
> PLATFORM_DEVID_NONE. The resulting platform ids are not only used to
> generate device-unique names, but are also used instead of the cell id
> to identify cells when probing subdevices.
> 
> These drivers should be updated to use PLATFORM_DEVID_AUTO, which would
> also allow more than one device to be registered without resorting to
> hacks (see for example wm831x), but lets fix the regression first by
> partially reverting the above mentioned commit with respect to
> PLATFORM_DEVID_NONE.
> 
> Fixes: 6e3f62f0793e ("mfd: core: Fix platform-device id generation")
> Cc: stable <stable@vger.kernel.org>	# v3.19
> Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  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 2a87f69be53d..1aed3b7b8d9b 100644
> --- a/drivers/mfd/mfd-core.c
> +++ b/drivers/mfd/mfd-core.c
> @@ -128,7 +128,7 @@ static int mfd_add_device(struct device *parent, int id,
>  	int platform_id;
>  	int r;
>  
> -	if (id < 0)
> +	if (id == PLATFORM_DEVID_AUTO)
>  		platform_id = id;
>  	else
>  		platform_id = id + cell->id;


  reply	other threads:[~2015-03-25 12:02 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 19:23 [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 1/5] mfd: max8997: " Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 2/5] mfd: da9055: " Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 3/5] mfd: lp8788: " Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 4/5] mfd: wm831x: " Bartlomiej Zolnierkiewicz
2015-03-20 19:23 ` [PATCH v2 5/5] mfd: da9052: Fix platform device names Bartlomiej Zolnierkiewicz
2015-03-23 10:07 ` [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure Johan Hovold
2015-03-23 13:11   ` Bartlomiej Zolnierkiewicz
2015-03-25 11:02     ` Johan Hovold
2015-03-25 11:07       ` [PATCH 1/2] mfd: da9052: fix broken regulator probe Johan Hovold
2015-03-25 11:07         ` [PATCH 2/2] mfd: core: fix platform-device name collisions Johan Hovold
2015-03-25 12:02           ` Bartlomiej Zolnierkiewicz [this message]
2015-03-26  8:34           ` Lee Jones
2015-03-25 12:01         ` [PATCH 1/2] mfd: da9052: fix broken regulator probe Bartlomiej Zolnierkiewicz
2015-03-26  8:32         ` Lee Jones
2015-04-14 13:04           ` Johan Hovold
2015-04-29  7:44             ` Johan Hovold
2015-04-29  8:41               ` Lee Jones
2015-05-13 15:43                 ` Lee Jones
2015-05-13 16:08                   ` Mark Brown
2015-05-13 16:54                     ` Lee Jones
2015-05-13 17:29                       ` Mark Brown
2015-05-14  7:19                         ` Lee Jones
2015-05-15 14:47                           ` Johan Hovold
2015-05-18  9:10                             ` Lee Jones
2015-05-18  9:51                               ` Johan Hovold
2015-05-18 10:13                                 ` Lee Jones
2015-05-18 16:28                                   ` Mark Brown
2015-05-18 16:24                                 ` Mark Brown
2015-05-18 16:46                                   ` Johan Hovold
2015-05-18 18:46                                     ` Mark Brown
2015-05-19 10:01                                       ` Johan Hovold
2015-05-19 10:38                                         ` Mark Brown
2015-05-19 11:01                                           ` Johan Hovold
2015-05-19 12:01                                             ` Mark Brown
2015-05-15 14:27                   ` [PATCH RESEND] " Johan Hovold
2015-05-18 18:47                     ` Mark Brown
2015-05-18 18:57                     ` Lee Jones
2015-03-30  7:18         ` [PATCH 1/2] " Lee Jones
2015-03-25 12:04       ` [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8499203.iFuRDWiNfB@amdc1032 \
    --to=b.zolnierkie@samsung.com \
    --cc=broonie@kernel.org \
    --cc=fabio.estevam@freescale.com \
    --cc=johan@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=milo.kim@ti.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=sameo@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=support.opensource@diasemi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.