[PATCH] mtd: m25p80: Get mtd_info->name from spi_device as the second choice
Rafał Miłecki
zajec5 at gmail.com
Sat Jul 11 10:14:52 PDT 2015
On 10 July 2015 at 10:10, Haikun Wang <haikun.wang at freescale.com> wrote:
> If we can't get "mtd_info->name" form struct flash_platform_data,
> get it from "spi_device".
>
> Signed-off-by: Haikun Wang <haikun.wang at freescale.com>
> ---
> drivers/mtd/devices/m25p80.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
> index d313f948b..ebac9e5 100644
> --- a/drivers/mtd/devices/m25p80.c
> +++ b/drivers/mtd/devices/m25p80.c
> @@ -215,6 +215,8 @@ static int m25p_probe(struct spi_device *spi)
>
> if (data && data->name)
> flash->mtd.name = data->name;
> + else
> + flash->mtd.name = dev_name(&spi->dev);
I'm curious. Is this for changing kernel messages to include some nice
name? Can you give us an example of before vs. after?
More information about the linux-mtd
mailing list