From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932740AbbJMRhV (ORCPT ); Tue, 13 Oct 2015 13:37:21 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36368 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752351AbbJMRhU (ORCPT ); Tue, 13 Oct 2015 13:37:20 -0400 Date: Tue, 13 Oct 2015 10:37:17 -0700 From: Brian Norris To: Frans Klaver Cc: David Woodhouse , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH v2 05/60] mtd: devices: m25p80: show parent device in sysfs Message-ID: <20151013173354.GW107187@google.com> References: <1433968754-10651-1-git-send-email-fransklaver@gmail.com> <1433968754-10651-6-git-send-email-fransklaver@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433968754-10651-6-git-send-email-fransklaver@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 10, 2015 at 10:38:19PM +0200, Frans Klaver wrote: > Fix a bug where mtd parent device symlinks aren't shown in sysfs. > > Signed-off-by: Frans Klaver This is one of the patches that didn't apply... > --- > drivers/mtd/devices/m25p80.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c > index 3af137f..dfa6ee0 100644 > --- a/drivers/mtd/devices/m25p80.c > +++ b/drivers/mtd/devices/m25p80.c > @@ -206,6 +206,7 @@ static int m25p_probe(struct spi_device *spi) > > spi_set_drvdata(spi, flash); > flash->mtd.priv = nor; > + flash->mtd.dev.parent = &spi->dev; ...but I don't think this patch is actually necessary. See spi_nor_scan(), which assigns mtd->dev.parent for us. So as long as the driver assigns the spi_nor::dev field, the spi-nor framework handles this for us. Same comment applies to fsl-quadspi.c (patch 59), which also didn't apply cleanly. So I don't think we need either of these patches. > flash->spi = spi; > > if (spi->mode & SPI_RX_QUAD) Regards, Brian