From: Chris Ball <cjb@laptop.org>
To: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Cc: linux-mmc@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
kgene.kim@samsung.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V5 1/3] SDHCI: S3C: Use generic clock names for sdhci bus clock options
Date: Wed, 26 Oct 2011 15:59:42 -0400 [thread overview]
Message-ID: <m2obx34j81.fsf@bob.laptop.org> (raw)
In-Reply-To: <1318588126-19167-2-git-send-email-rajeshwari.s@samsung.com> (Rajeshwari Shinde's message of "Fri, 14 Oct 2011 15:58:44 +0530")
Hi Rajeshwari, Kukjin,
On Fri, Oct 14 2011, Rajeshwari Shinde wrote:
> This patch modifies the driver to stop depending on the clock names
> being passed from the platform and switch over to bus clock lookup
> using generic clock names.
>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
> drivers/mmc/host/sdhci-s3c.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 82709b6..a5fde87 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -435,14 +435,12 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
>
> for (clks = 0, ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
> struct clk *clk;
> - char *name = pdata->clocks[ptr];
> + char name[14];
>
> - if (name == NULL)
> - continue;
> + sprintf(name, "mmc_busclk.%d", ptr);
Let's use snprintf() here instead -- it's better to have fewer uses of
sprintf() to audit.
> clk = clk_get(dev, name);
> if (IS_ERR(clk)) {
> - dev_err(dev, "failed to get clock %s\n", name);
> continue;
> }
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
WARNING: multiple messages have this Message-ID (diff)
From: cjb@laptop.org (Chris Ball)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V5 1/3] SDHCI: S3C: Use generic clock names for sdhci bus clock options
Date: Wed, 26 Oct 2011 15:59:42 -0400 [thread overview]
Message-ID: <m2obx34j81.fsf@bob.laptop.org> (raw)
In-Reply-To: <1318588126-19167-2-git-send-email-rajeshwari.s@samsung.com> (Rajeshwari Shinde's message of "Fri, 14 Oct 2011 15:58:44 +0530")
Hi Rajeshwari, Kukjin,
On Fri, Oct 14 2011, Rajeshwari Shinde wrote:
> This patch modifies the driver to stop depending on the clock names
> being passed from the platform and switch over to bus clock lookup
> using generic clock names.
>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
> drivers/mmc/host/sdhci-s3c.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 82709b6..a5fde87 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -435,14 +435,12 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
>
> for (clks = 0, ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
> struct clk *clk;
> - char *name = pdata->clocks[ptr];
> + char name[14];
>
> - if (name == NULL)
> - continue;
> + sprintf(name, "mmc_busclk.%d", ptr);
Let's use snprintf() here instead -- it's better to have fewer uses of
sprintf() to audit.
> clk = clk_get(dev, name);
> if (IS_ERR(clk)) {
> - dev_err(dev, "failed to get clock %s\n", name);
> continue;
> }
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2011-10-26 20:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 10:28 [PATCH V5 0/3] ARM: SAMSUNG: Add support for sdhci clock lookup using generic names Rajeshwari Shinde
2011-10-14 10:28 ` Rajeshwari Shinde
2011-10-14 10:28 ` [PATCH V5 1/3] SDHCI: S3C: Use generic clock names for sdhci bus clock options Rajeshwari Shinde
2011-10-14 10:28 ` Rajeshwari Shinde
2011-10-24 15:16 ` Kukjin Kim
2011-10-24 15:16 ` Kukjin Kim
2011-10-26 19:59 ` Chris Ball [this message]
2011-10-26 19:59 ` Chris Ball
2011-10-31 4:22 ` Rajeshwari Birje
2011-10-31 4:22 ` Rajeshwari Birje
2011-10-14 10:28 ` [PATCH V5 2/3] ARM: SAMSUNG: Remove SDHCI bus clocks from platform data Rajeshwari Shinde
2011-10-14 10:28 ` Rajeshwari Shinde
2011-10-14 10:28 ` [PATCH V6 3/3] ARM: SAMSUNG: Add lookup of sdhci-s3c clocks using generic names Rajeshwari Shinde
2011-10-14 10:28 ` Rajeshwari Shinde
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=m2obx34j81.fsf@bob.laptop.org \
--to=cjb@laptop.org \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=rajeshwari.s@samsung.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.