From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Viresh Kumar <viresh.kumar@st.com>
Cc: Vipin Kumar <vipin.kumar@st.com>,
linux-mtd@lists.infradead.org, dwmw2@infradead.org,
linus.walleij@stericsson.com
Subject: Re: [PATCH V2] fsmc-nand: Add fsmc_nand_set_plat_data in linux/mtd/fsmc.h
Date: Fri, 25 Feb 2011 14:14:19 +0200 [thread overview]
Message-ID: <1298636059.2798.98.camel@localhost> (raw)
In-Reply-To: <954e52aaae5014c2d72ac76f603f288186d67fa1.1298634044.git.viresh.kumar@st.com>
On Fri, 2011-02-25 at 17:22 +0530, Viresh Kumar wrote:
> +/* This function is used to set platform data field of pdev->dev */
> +void fsmc_nand_set_plat_data(struct platform_device *pdev,
> + struct mtd_partition *partitions, unsigned int nr_partitions,
> + unsigned int options, unsigned int width)
> +{
> + struct fsmc_nand_platform_data *plat_data;
> + plat_data = dev_get_platdata(&pdev->dev);
> +
> + if (partitions) {
> + plat_data->partitions = partitions;
> + plat_data->nr_partitions = nr_partitions;
> + }
> +
> + plat_data->options = options;
> + plat_data->width = width;
> +}
> +EXPORT_SYMBOL_GPL(fsmc_nand_set_plat_data);
> +
> /* Assert CS signal based on chipnr */
> static void fsmc_select_chip(struct mtd_info *mtd, int chipnr)
> {
> diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
> index 6987995..29e039b 100644
> --- a/include/linux/mtd/fsmc.h
> +++ b/include/linux/mtd/fsmc.h
> @@ -160,4 +160,9 @@ extern void __init fsmc_init_board_info(struct platform_device *pdev,
> struct mtd_partition *partitions, unsigned int nr_partitions,
> unsigned int width);
>
> +/* This function is used to set platform data field of pdev->dev */
Sorry for nit-picking, but having 2 copies of the same comment is prone
to inconsistency :-) I think the general linux way is to put the comment
above the function body and leave the prototype declarations without any
comments.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
prev parent reply other threads:[~2011-02-25 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 11:52 [PATCH V2] fsmc-nand: Add fsmc_nand_set_plat_data in linux/mtd/fsmc.h Viresh Kumar
2011-02-25 12:14 ` Artem Bityutskiy [this message]
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=1298636059.2798.98.camel@localhost \
--to=artem.bityutskiy@nokia.com \
--cc=dwmw2@infradead.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-mtd@lists.infradead.org \
--cc=vipin.kumar@st.com \
--cc=viresh.kumar@st.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox