lkml.org 
[lkml]   [2020]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-11-26 13:03    [W:0.059 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site