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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 2 Aug 2018 15:14:34 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     Frieder Schrempf <frieder.schrempf@...eet.de>
Cc:     dwmw2@...radead.org, computersforpeace@...il.com,
        marek.vasut@...il.com, richard@....at, broonie@...nel.org,
        linux-mtd@...ts.infradead.org, linux-spi@...r.kernel.org,
        cyrille.pitchen@...ev4u.fr, pp@...ix.com, Zhiqiang.Hou@....com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] mtd: m25p80: Call spi_mem_get_name() to let
 controller set a custom name

On Thu,  2 Aug 2018 14:53:54 +0200
Frieder Schrempf <frieder.schrempf@...eet.de> wrote:

> 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.
> 
> Suggested-by: Boris Brezillon <boris.brezillon@...tlin.com>
> Signed-off-by: Frieder Schrempf <frieder.schrempf@...eet.de>

Acked-by: Boris Brezillon <boris.brezillon@...tlin.com>

> ---
>  drivers/mtd/devices/m25p80.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index e84563d..aac48800 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -202,6 +202,9 @@ static int m25p_probe(struct spi_mem *spimem)
>  	if (data && data->name)
>  		nor->mtd.name = data->name;
>  
> +	if (!nor->mtd.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
>  	 * set to "m25p80" and then "type" provides a real chip name.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ