From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/3] ACPI: amba bus probing support
Date: Sun, 3 Jan 2016 13:36:46 +0000 [thread overview]
Message-ID: <20160103133645.GC5779@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1450880383-29560-2-git-send-email-aleksey.makarov@linaro.org>
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.
next prev parent reply other threads:[~2016-01-03 13:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 14:19 [PATCH v4 0/3] Add AMBA bus probing support to ACPI Aleksey Makarov
2015-12-23 14:19 ` [PATCH v4 1/3] ACPI: amba bus probing support Aleksey Makarov
2015-12-23 18:49 ` Andy Shevchenko
2016-01-03 13:36 ` Russell King - ARM Linux [this message]
2015-12-23 14:19 ` [PATCH v4 2/3] ACPI: scan add in amba probing Aleksey Makarov
2015-12-23 14:19 ` [PATCH v4 3/3] serial: amba-pl011: add ACPI support to AMBA probe Aleksey Makarov
2016-01-04 23:13 ` Timur Tabi
2016-01-05 8:55 ` G Gregory
2016-01-05 16:23 ` Timur Tabi
2016-01-06 11:03 ` Graeme Gregory
2016-01-11 21:38 ` Timur Tabi
2016-01-03 0:39 ` [PATCH v4 0/3] Add AMBA bus probing support to ACPI Rafael J. Wysocki
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=20160103133645.GC5779@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).