From: Stephen Warren <swarren@wwwdotorg.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Danny Huang <dahuang@nvidia.com>,
linux@arm.linux.org.uk, hdoyu@nvidia.com, olof@lixom.net,
gregkh@linuxfoundation.org, josephl@nvidia.com,
pdeschrijver@nvidia.com, pgaikwad@nvidia.com,
linux-arm-kernel@lists.infradead.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ARM: tegra: expose chip ID and revision
Date: Tue, 12 Mar 2013 12:04:28 -0600 [thread overview]
Message-ID: <513F6E2C.1000101@wwwdotorg.org> (raw)
In-Reply-To: <201303121259.18710.arnd@arndb.de>
On 03/12/2013 06:59 AM, Arnd Bergmann wrote:
> On Tuesday 12 March 2013, Danny Huang wrote:
>>
>> +void __init tegra_soc_device_init(void)
>> +{
>> + struct soc_device *soc_dev;
>> + struct soc_device_attribute *soc_dev_attr;
>> +
>> + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
>> + if (!soc_dev_attr)
>> + return;
>> +
>> + soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%d", tegra_chip_id);
>> + soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d", tegra_revision);
>> + soc_dev_attr->family = kasprintf(GFP_KERNEL, "Tegra");
>> +
>> + soc_dev = soc_device_register(soc_dev_attr);
>> + if (IS_ERR_OR_NULL(soc_dev))
>> + kfree(soc_dev_attr);
>> +
>> + return;
>
> You are dropping the soc_dev on the floor here by just returning.
>
> The idea of the soc node is to have all on-soc components be children
> of that node, so you should instead pass it into of_platform_populate
> as the parent device.
Tegra DTs don't have a separate node for on-soc vs. off-soc components.
Wouldn't passing soc_dev into of_platform_populate() make everything a
child of this soc_dev; is that what we want?
next prev parent reply other threads:[~2013-03-12 18:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 12:01 [PATCH v2] ARM: tegra: expose chip ID and revision Danny Huang
2013-03-12 12:16 ` Russell King - ARM Linux
2013-03-12 12:59 ` Arnd Bergmann
2013-03-12 18:04 ` Stephen Warren [this message]
2013-03-12 19:10 ` Arnd Bergmann
2013-03-12 19:45 ` Stephen Warren
2013-03-12 17:58 ` Stephen Warren
2013-03-12 18:01 ` Stephen Warren
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=513F6E2C.1000101@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=arnd@arndb.de \
--cc=dahuang@nvidia.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdoyu@nvidia.com \
--cc=josephl@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=olof@lixom.net \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.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