From: Xu Yilun Date: Wed, 24 Jun 2020 01:31:25 +0000 (+0800) Subject: spi: altera: fix driver matching failure of the device ID "spi_altera" X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=de5fd9cb6a3f89a1ac8f27883d029f823112243f;p=linux.git spi: altera: fix driver matching failure of the device ID "spi_altera" The driver is expected to support device ID "spi_altera" for MMIO accessed devices, device ID "subdev_spi_altera" for indirect accessed devices. But the platform bus will not try driver name match anymore if the platform driver has an id_table. So the "spi_altera" should also be added to id_table. Signed-off-by: Xu Yilun Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/1592962286-25752-2-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c index d91c0934a6196..e272a041f7042 100644 --- a/drivers/spi/spi-altera.c +++ b/drivers/spi/spi-altera.c @@ -352,7 +352,8 @@ MODULE_DEVICE_TABLE(of, altera_spi_match); #endif /* CONFIG_OF */ static const struct platform_device_id altera_spi_ids[] = { - { "subdev_spi_altera", ALTERA_SPI_TYPE_SUBDEV }, + { DRV_NAME, ALTERA_SPI_TYPE_UNKNOWN }, + { "subdev_spi_altera", ALTERA_SPI_TYPE_SUBDEV }, { } };