[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201303121259.18710.arnd@arndb.de>
Date: Tue, 12 Mar 2013 12:59:18 +0000
From: Arnd Bergmann <arnd@...db.de>
To: Danny Huang <dahuang@...dia.com>
Cc: linux@....linux.org.uk, swarren@...dotorg.org, hdoyu@...dia.com,
olof@...om.net, gregkh@...uxfoundation.org, josephl@...dia.com,
pdeschrijver@...dia.com, pgaikwad@...dia.com,
linux-arm-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ARM: tegra: expose chip ID and revision
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.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists