public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Boris BREZILLON <boris.brezillon@free-electrons.com>
Cc: linux-mtd@lists.infradead.org, Lee Jones <lee.jones@linaro.org>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mtd: nand: add ONFI timing mode to nand_timings converter
Date: Mon, 21 Jul 2014 19:39:47 -0700	[thread overview]
Message-ID: <20140722023947.GZ7537@ld-irv-0074> (raw)
In-Reply-To: <1405064982-11456-3-git-send-email-boris.brezillon@free-electrons.com>

On Fri, Jul 11, 2014 at 09:49:42AM +0200, Boris BREZILLON wrote:
> --- /dev/null
> +++ b/drivers/mtd/nand/nand_timings.c
> @@ -0,0 +1,250 @@
> +/*
> + *  Copyright (C) 2014 Free Electrons
> + *
> + *  Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + */
> +#include <linux/mtd/nand.h>
[...]
> +/**
> + * onfi_async_timing_mode_to_sdr_timings - [NAND Interface] Retrieve NAND
> + * timings according to the given ONFI timing mode
> + * @mode: ONFI timing mode
> + */
> +const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode)
> +{
> +	if (mode < 0 || mode >= ARRAY_SIZE(onfi_sdr_timings))

Might need <linux/kernel.h> for this.

> +		return ERR_PTR(-EINVAL);

And <linux/err.h> for this.

> +
> +	return &onfi_sdr_timings[mode];
> +}
> +EXPORT_SYMBOL(onfi_async_timing_mode_to_sdr_timings);

<linux/export.h> for this.

I'll squash in the appended diff.

Brian

diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/nand_timings.c
index f154780cf60f..8b36253420fa 100644
--- a/drivers/mtd/nand/nand_timings.c
+++ b/drivers/mtd/nand/nand_timings.c
@@ -8,6 +8,9 @@
  * published by the Free Software Foundation.
  *
  */
+#include <linux/kernel.h>
+#include <linux/err.h>
+#include <linux/export.h>
 #include <linux/mtd/nand.h>
 
 static const struct nand_sdr_timings onfi_sdr_timings[] = {

  reply	other threads:[~2014-07-22  2:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11  7:49 [PATCH 0/2] mtd: nand: add basic SDR NAND timings infrastructure Boris BREZILLON
2014-07-11  7:49 ` [PATCH 1/2] mtd: nand: define struct nand_timings Boris BREZILLON
2014-07-22 10:03   ` Matthieu CASTET
2014-07-22 12:12     ` Boris BREZILLON
2014-07-24  9:56       ` Matthieu CASTET
2014-07-24 10:16         ` Boris BREZILLON
2014-07-24 16:53           ` Brian Norris
2014-07-11  7:49 ` [PATCH 2/2] mtd: nand: add ONFI timing mode to nand_timings converter Boris BREZILLON
2014-07-22  2:39   ` Brian Norris [this message]
2014-07-22  8:32     ` Boris BREZILLON
2014-07-22  2:41 ` [PATCH 0/2] mtd: nand: add basic SDR NAND timings infrastructure 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=20140722023947.GZ7537@ld-irv-0074 \
    --to=computersforpeace@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=dwmw2@infradead.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox