[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201126115838.GA29170@wunner.de>
Date: Thu, 26 Nov 2020 12:58:38 +0100
From: Lukas Wunner <lukas@...ner.de>
To: Qing Zhang <zhangqing@...ngson.cn>
Cc: Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
linux-spi@...r.kernel.org, Huacai Chen <chenhc@...ote.com>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
devicetree@...r.kernel.org, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org,
Philippe Mathieu-Daudé <f4bug@...at.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Krzysztof Kozlowski <krzk@...nel.org>
Subject: Re: [PATCH 1/3] spi: Loongson: Add Loongson 3A+7A SPI controller
driver support
On Mon, Nov 23, 2020 at 05:19:06PM +0800, Qing Zhang wrote:
> +static struct platform_device loongson_spi_device = {
> + .name = "loongson-spi",
> + .id = 0,
> + .num_resources = ARRAY_SIZE(loongson_spi_resources),
> + .resource = loongson_spi_resources,
> +};
Why isn't this struct allocated at runtime?
> + if (ret == PCIBIOS_SUCCESSFUL) {
> + loongson_spi_resources[1].start = v8;
> + loongson_spi_resources[1].end = v8;
> + platform_device_register(&loongson_spi_device);
> + }
> +
> +err_out:
> + return ret;
> +}
> +
> +static void loongson_spi_pci_unregister(struct pci_dev *pdev)
> +{
> + pci_release_region(pdev, 0);
> +}
Seems like platform_device_unregister() is missing here.
Thanks,
Lukas
Powered by blists - more mailing lists