* [PATCH] mtd: physmap_of: assign parent for the concatenated MTD
@ 2015-10-27 2:35 Brian Norris
2015-10-27 7:08 ` Frans Klaver
0 siblings, 1 reply; 2+ messages in thread
From: Brian Norris @ 2015-10-27 2:35 UTC (permalink / raw)
To: linux-mtd; +Cc: Brian Norris, Frans Klaver
If there is more than one map region for this device, then the
concatenated MTD will not have a parent device assigned to it -- only
the sub-devices (which are not actually registered with the framework)
will have their parents assigned. Let's assign the concatenated device
correctly.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Frans Klaver <fransklaver@gmail.com>
---
This has a minor context conflict with [1], so I've just based this patch on
top of it. I could adjust the context, depending on which comes first.
(I noticed this while passing through drivers for [1])
[1] http://lists.infradead.org/pipermail/linux-mtd/2015-October/062825.html
drivers/mtd/maps/physmap_of.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 6ebe674262cc..305eaa4c15d4 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -309,6 +309,7 @@ static int of_flash_probe(struct platform_device *dev)
if (err)
goto err_out;
+ info->cmtd->dev.parent = &dev->dev;
info->cmtd->dev.of_node = dp;
part_probe_types = of_get_probes(dp);
if (!part_probe_types) {
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: physmap_of: assign parent for the concatenated MTD
2015-10-27 2:35 [PATCH] mtd: physmap_of: assign parent for the concatenated MTD Brian Norris
@ 2015-10-27 7:08 ` Frans Klaver
0 siblings, 0 replies; 2+ messages in thread
From: Frans Klaver @ 2015-10-27 7:08 UTC (permalink / raw)
To: Brian Norris; +Cc: linux-mtd
On Tue, Oct 27, 2015 at 3:35 AM, Brian Norris
<computersforpeace@gmail.com> wrote:
> If there is more than one map region for this device, then the
> concatenated MTD will not have a parent device assigned to it -- only
> the sub-devices (which are not actually registered with the framework)
> will have their parents assigned. Let's assign the concatenated device
> correctly.
>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Frans Klaver <fransklaver@gmail.com>
> ---
> This has a minor context conflict with [1], so I've just based this patch on
> top of it. I could adjust the context, depending on which comes first.
>
> (I noticed this while passing through drivers for [1])
>
> [1] http://lists.infradead.org/pipermail/linux-mtd/2015-October/062825.html
>
> drivers/mtd/maps/physmap_of.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
> index 6ebe674262cc..305eaa4c15d4 100644
> --- a/drivers/mtd/maps/physmap_of.c
> +++ b/drivers/mtd/maps/physmap_of.c
> @@ -309,6 +309,7 @@ static int of_flash_probe(struct platform_device *dev)
> if (err)
> goto err_out;
>
> + info->cmtd->dev.parent = &dev->dev;
> info->cmtd->dev.of_node = dp;
> part_probe_types = of_get_probes(dp);
> if (!part_probe_types) {
That seems sensible.
Thanks,
Frans
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-27 7:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27 2:35 [PATCH] mtd: physmap_of: assign parent for the concatenated MTD Brian Norris
2015-10-27 7:08 ` Frans Klaver
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).