lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1530789310-16254-3-git-send-email-frieder.schrempf@exceet.de>
Date:   Thu,  5 Jul 2018 13:14:58 +0200
From:   Frieder Schrempf <frieder.schrempf@...eet.de>
To:     linux-mtd@...ts.infradead.org, boris.brezillon@...tlin.com,
        linux-spi@...r.kernel.org
Cc:     dwmw2@...radead.org, computersforpeace@...il.com,
        marek.vasut@...il.com, richard@....at, miquel.raynal@...tlin.com,
        broonie@...nel.org, david.wolfe@....com, fabio.estevam@....com,
        prabhakar.kushwaha@....com, yogeshnarayan.gaur@....com,
        han.xu@....com, shawnguo@...nel.org,
        Frieder Schrempf <frieder.schrempf@...eet.de>,
        Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
        Hou Zhiqiang <Zhiqiang.Hou@....com>,
        Philipp Puschmann <pp@...ix.com>, linux-kernel@...r.kernel.org
Subject: [PATCH v2 02/12] mtd: m25p80: Call spi_mem_get_name() to let controller set a custom name

By calling spi_mem_get_name(), the driver of the (Q)SPI controller can
set a custom name for the memory device if necessary.
This is useful to keep mtdparts compatible when controller drivers are
ported from the MTD to the SPI layer.

Signed-off-by: Frieder Schrempf <frieder.schrempf@...eet.de>
---
 drivers/mtd/devices/m25p80.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index e84563d..482f0ef 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -199,8 +199,7 @@ static int m25p_probe(struct spi_mem *spimem)
 			hwcaps.mask |= SNOR_HWCAPS_READ_1_2_2;
 	}
 
-	if (data && data->name)
-		nor->mtd.name = data->name;
+	nor->mtd.name = spi_mem_get_name(spimem);
 
 	/* For some (historical?) reason many platforms provide two different
 	 * names in flash_platform_data: "name" and "type". Quite often name is
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ