From: Lee Jones <lee.jones@linaro.org>
To: Johan Hovold <johan@kernel.org>
Cc: 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,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
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: Thu, 26 Mar 2015 08:34:20 +0000 [thread overview]
Message-ID: <20150326083420.GF5951@x1> (raw)
In-Reply-To: <1427281625-31241-2-git-send-email-johan@kernel.org>
On Wed, 25 Mar 2015, 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>
> ---
> drivers/mfd/mfd-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
> 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;
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2015-03-26 8:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150325110231.GC10412@localhost>
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
2015-03-26 8:34 ` Lee Jones [this message]
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
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=20150326083420.GF5951@x1 \
--to=lee.jones@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=fabio.estevam@freescale.com \
--cc=johan@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).