mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
spi: Use named initializers for platform_device_id arrays
Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct platform_device_id replacing .driver_data by an anonymous union. While touching these arrays unify spacing and usage of commas. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/3fcd432a505bb1bb7f8ef0fba9162243200b3347.1780606153.git.u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
2cf4ad412f
commit
fc82dda1dc
@@ -139,8 +139,8 @@ MODULE_DEVICE_TABLE(of, altera_spi_match);
|
||||
#endif /* CONFIG_OF */
|
||||
|
||||
static const struct platform_device_id altera_spi_ids[] = {
|
||||
{ DRV_NAME, ALTERA_SPI_TYPE_UNKNOWN },
|
||||
{ "subdev_spi_altera", ALTERA_SPI_TYPE_SUBDEV },
|
||||
{ .name = DRV_NAME, .driver_data = ALTERA_SPI_TYPE_UNKNOWN },
|
||||
{ .name = "subdev_spi_altera", .driver_data = ALTERA_SPI_TYPE_SUBDEV },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, altera_spi_ids);
|
||||
|
||||
@@ -477,8 +477,7 @@ static const struct platform_device_id bcm63xx_spi_dev_match[] = {
|
||||
.name = "bcm6358-spi",
|
||||
.driver_data = (unsigned long)bcm6358_spi_reg_offsets,
|
||||
},
|
||||
{
|
||||
},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, bcm63xx_spi_dev_match);
|
||||
|
||||
|
||||
@@ -438,8 +438,8 @@ static int cs42l43_spi_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct platform_device_id cs42l43_spi_id_table[] = {
|
||||
{ "cs42l43-spi", },
|
||||
{}
|
||||
{ .name = "cs42l43-spi" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, cs42l43_spi_id_table);
|
||||
|
||||
|
||||
@@ -1377,8 +1377,8 @@ static int rspi_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct platform_device_id spi_driver_ids[] = {
|
||||
{ "rspi", (kernel_ulong_t)&rspi_ops },
|
||||
{},
|
||||
{ .name = "rspi", .driver_data = (kernel_ulong_t)&rspi_ops },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(platform, spi_driver_ids);
|
||||
|
||||
@@ -1613,10 +1613,10 @@ static const struct s3c64xx_spi_port_config gs101_spi_port_config = {
|
||||
|
||||
static const struct platform_device_id s3c64xx_spi_driver_ids[] = {
|
||||
{
|
||||
.name = "s3c6410-spi",
|
||||
.driver_data = (kernel_ulong_t)&s3c6410_spi_port_config,
|
||||
.name = "s3c6410-spi",
|
||||
.driver_data = (kernel_ulong_t)&s3c6410_spi_port_config,
|
||||
},
|
||||
{ },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, s3c64xx_spi_driver_ids);
|
||||
|
||||
|
||||
@@ -1310,8 +1310,8 @@ static void sh_msiof_spi_remove(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct platform_device_id spi_driver_ids[] = {
|
||||
{ "spi_sh_msiof", (kernel_ulong_t)&sh_data },
|
||||
{},
|
||||
{ .name = "spi_sh_msiof", .driver_data = (kernel_ulong_t)&sh_data },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, spi_driver_ids);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user