Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300300
| From | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 1/3] ACPI: amba bus probing support |
| Date | 2016-01-03 14:40 +0100 |
| Message-ID | <qMR34-62z-17@gated-at.bofh.it> (permalink) |
| References | <qISAq-2iG-5@gated-at.bofh.it> <qISAq-2iG-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Dec 23, 2015 at 05:19:40PM +0300, Aleksey Makarov wrote:
> + dev = amba_device_alloc(NULL, 0, 0);
> + if (!dev) {
> + dev_err(&adev->dev, "%s(): amba_device_alloc() failed\n",
> + __func__);
> + return -ENOMEM;
> + }
...
> + /*
> + * If the ACPI node has a parent and that parent has a physical device
> + * attached to it, that physical device should be the parent of the
> + * platform device we are about to create.
> + */
> + dev->dev.parent = NULL;
No need to initialise this; amba_device_alloc() uses kzalloc(), and so
dev->dev.parent will already be NULL.
...
> + dev_set_name(&dev->dev, "%s", dev_name(&adev->dev));
Is there a reason not to use:
dev = amba_device_alloc(dev_name(&adev->dev), 0, 0);
above?
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/3] Add AMBA bus probing support to ACPI Aleksey Makarov <aleksey.makarov@linaro.org> - 2015-12-23 15:30 +0100
[PATCH v4 2/3] ACPI: scan add in amba probing Aleksey Makarov <aleksey.makarov@linaro.org> - 2015-12-23 15:30 +0100
[PATCH v4 1/3] ACPI: amba bus probing support Aleksey Makarov <aleksey.makarov@linaro.org> - 2015-12-23 15:30 +0100
Re: [PATCH v4 1/3] ACPI: amba bus probing support Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-23 20:00 +0100
Re: [PATCH v4 1/3] ACPI: amba bus probing support Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-03 14:40 +0100
Re: [PATCH v4 0/3] Add AMBA bus probing support to ACPI "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-03 01:10 +0100
csiph-web