From: Stephen Boyd <sboyd@codeaurora.org>
To: Thomas Abraham <thomas.abraham@linaro.org>
Cc: devicetree-discuss@lists.ozlabs.org, kgene.kim@samsung.com,
grant.likely@secretlab.ca, linux-samsung-soc@vger.kernel.org,
linux-i2c@vger.kernel.org, ben-linux@fluff.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/2] i2c: s3c2410: Keep a copy of platform data and use it
Date: Tue, 13 Sep 2011 00:01:17 -0700 [thread overview]
Message-ID: <4E6EFFBD.6050609@codeaurora.org> (raw)
In-Reply-To: <1315887365-30532-2-git-send-email-thomas.abraham@linaro.org>
On 9/12/2011 9:16 PM, Thomas Abraham wrote:
> @@ -809,6 +810,15 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
>
> + i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
> + if (!i2c->pdata) {
> + ret = -ENOMEM;
> + goto err_noclk;
> + }
> +
> + if (pdata)
> + memcpy(i2c->pdata, pdata, sizeof(*pdata));
> +
Is there a devm_kmemdup()? If not, maybe it would be a good idea to add it.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] i2c: s3c2410: Keep a copy of platform data and use it
Date: Tue, 13 Sep 2011 00:01:17 -0700 [thread overview]
Message-ID: <4E6EFFBD.6050609@codeaurora.org> (raw)
In-Reply-To: <1315887365-30532-2-git-send-email-thomas.abraham@linaro.org>
On 9/12/2011 9:16 PM, Thomas Abraham wrote:
> @@ -809,6 +810,15 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
>
> + i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
> + if (!i2c->pdata) {
> + ret = -ENOMEM;
> + goto err_noclk;
> + }
> +
> + if (pdata)
> + memcpy(i2c->pdata, pdata, sizeof(*pdata));
> +
Is there a devm_kmemdup()? If not, maybe it would be a good idea to add it.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2011-09-13 7:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-13 4:16 [PATCH v3 0/2] Add device tree support for Samsung's I2C driver Thomas Abraham
2011-09-13 4:16 ` Thomas Abraham
2011-09-13 4:16 ` [PATCH v3 1/2] i2c: s3c2410: Keep a copy of platform data and use it Thomas Abraham
2011-09-13 4:16 ` Thomas Abraham
2011-09-13 4:16 ` [PATCH v3 2/2] i2c: s3c2410: Add device tree support Thomas Abraham
2011-09-13 4:16 ` Thomas Abraham
2011-09-13 7:01 ` Stephen Boyd [this message]
2011-09-13 7:01 ` [PATCH v3 1/2] i2c: s3c2410: Keep a copy of platform data and use it Stephen Boyd
2011-09-14 21:13 ` [PATCH v3 0/2] Add device tree support for Samsung's I2C driver Ben Dooks
2011-09-14 21:13 ` Ben Dooks
[not found] ` <20110914211338.GA2146-RazCHl0VsYgkUSuvROHNpA@public.gmane.org>
2011-09-15 1:09 ` Thomas Abraham
2011-09-15 1:09 ` Thomas Abraham
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=4E6EFFBD.6050609@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=ben-linux@fluff.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=thomas.abraham@linaro.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 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.