[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160103133645.GC5779@n2100.arm.linux.org.uk>
Date: Sun, 3 Jan 2016 13:36:46 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Aleksey Makarov <aleksey.makarov@...aro.org>
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Graeme Gregory <graeme.gregory@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Shannon Zhao <shannon.zhao@...aro.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Vladimir Zapolskiy <vz@...ia.com>, Len Brown <lenb@...nel.org>
Subject: Re: [PATCH v4 1/3] ACPI: amba bus probing support
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@...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