From: Artem Bityutskiy <dedekind1@gmail.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] fsmc-nand: Add fsmc_nand_set_plat_data in linux/mtd/fsmc.h
Date: Fri, 25 Feb 2011 13:11:02 +0200 [thread overview]
Message-ID: <1298632262.2798.66.camel@localhost> (raw)
In-Reply-To: <e63303f4cd51aa61f08e2b026b6a80dc0d9cd54a.1298442421.git.viresh.kumar@st.com>
On Wed, 2011-02-23 at 12:19 +0530, Viresh Kumar wrote:
> In most of the cases partitions info, width, etc comes from board files. And
> device structure may be defined in machine files, common to all board files.
> Thus, we need to set platform data from board file, for which
> fsmc_nand_set_plat_data routine is required.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
> Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
> ---
> include/linux/mtd/fsmc.h | 17 +++++++++++++++++
> 1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
> index 6987995..0cba324 100644
> --- a/include/linux/mtd/fsmc.h
> +++ b/include/linux/mtd/fsmc.h
> @@ -160,4 +160,21 @@ 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 */
> +static inline 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;
> +}
Isn't this function too big to be an inline func in a header file?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2011-02-25 11:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 6:49 [PATCH] fsmc-nand: Add fsmc_nand_set_plat_data in linux/mtd/fsmc.h Viresh Kumar
2011-02-24 12:38 ` Linus Walleij
2011-02-25 3:44 ` viresh kumar
2011-02-25 8:39 ` Linus Walleij
2011-02-25 11:07 ` Artem Bityutskiy
2011-02-25 11:11 ` viresh kumar
2011-02-25 11:12 ` Artem Bityutskiy
2011-02-25 11:11 ` Artem Bityutskiy [this message]
2011-02-25 11:22 ` viresh kumar
2011-02-25 11:25 ` Artem Bityutskiy
2011-02-25 11:43 ` viresh kumar
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=1298632262.2798.66.camel@localhost \
--to=dedekind1@gmail.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