Re: [PATCH 1/3] spi: Loongson: Add Loongson 3A+7A SPI controller driver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux