From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932354AbbJaDgE (ORCPT ); Fri, 30 Oct 2015 23:36:04 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33304 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753471AbbJaDdy (ORCPT ); Fri, 30 Oct 2015 23:33:54 -0400 From: Brian Norris To: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Brian Norris , Boris Brezillon , Ezequiel Garcia , Marek Vasut , Scott Wood , Josh Wu , Robert Jarzmik , Kyungmin Park , Han Xu Subject: [PATCH v2 11/11] mtd: physmap_of: assign parent for the concatenated MTD Date: Fri, 30 Oct 2015 20:33:30 -0700 Message-Id: <1446262410-45754-12-git-send-email-computersforpeace@gmail.com> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1446262410-45754-1-git-send-email-computersforpeace@gmail.com> References: <1446262410-45754-1-git-send-email-computersforpeace@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v2: lumped into this series, since its context depends on this series 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 b78265688075..70c453144f00 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; mtd_set_of_node(info->cmtd, dp); part_probe_types = of_get_probes(dp); if (!part_probe_types) { -- 2.6.0.rc2.230.g3dd15c0