All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <shijie8@gmail.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org,
	David Woodhouse <David.Woodhouse@intel.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH 2/2] mtd: spi-nor: drop jedec_probe /helper/ function
Date: Sat, 9 Aug 2014 19:06:05 +0800	[thread overview]
Message-ID: <20140809110604.GB1674@localhost.localdomain> (raw)
In-Reply-To: <1407397622-9252-2-git-send-email-zajec5@gmail.com>

On Thu, Aug 07, 2014 at 09:47:02AM +0200, Rafał Miłecki wrote:
> It's a one-liner doing no magic and its name may be confusing because
> it does not have to use JEDEC (e.g. when using alternative read_id).
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index 06fe959..ef45177 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -660,11 +660,6 @@ static const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor)
>  	return ERR_PTR(-ENODEV);
>  }
>  
> -static const struct spi_device_id *jedec_probe(struct spi_nor *nor)
> -{
> -	return nor->read_id(nor);
> -}
> -
>  static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len,
>  			size_t *retlen, u_char *buf)
>  {
> @@ -939,7 +934,7 @@ int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id,
>  	if (info->jedec_id) {
>  		const struct spi_device_id *jid;
>  
> -		jid = jedec_probe(nor);
> +		jid = nor->read_id(nor);
>  		if (IS_ERR(jid)) {
>  			return PTR_ERR(jid);
>  		} else if (jid != id) {
> -- 
> 1.8.4.5
Acked-by: Huang Shijie <shijie8@gmail.com>

  reply	other threads:[~2014-08-09 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07  7:47 [PATCH 1/2] mtd: spi-nor: remove duplicated w25q128 entry Rafał Miłecki
2014-08-07  7:47 ` [PATCH 2/2] mtd: spi-nor: drop jedec_probe /helper/ function Rafał Miłecki
2014-08-09 11:06   ` Huang Shijie [this message]
2014-08-09 11:03 ` [PATCH 1/2] mtd: spi-nor: remove duplicated w25q128 entry Huang Shijie
2014-08-16  1:32   ` Brian Norris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140809110604.GB1674@localhost.localdomain \
    --to=shijie8@gmail.com \
    --cc=David.Woodhouse@intel.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.