mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
iio: 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. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
3dd0c04840
commit
36862727e0
|
|
@ -373,7 +373,7 @@ static DEFINE_RUNTIME_DEV_PM_OPS(pm886_gpadc_pm_ops,
|
|||
pm886_gpadc_runtime_resume, NULL);
|
||||
|
||||
static const struct platform_device_id pm886_gpadc_id[] = {
|
||||
{ "88pm886-gpadc" },
|
||||
{ .name = "88pm886-gpadc" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, pm886_gpadc_id);
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ static int max77541_adc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
static const struct platform_device_id max77541_adc_platform_id[] = {
|
||||
{ "max77541-adc" },
|
||||
{ .name = "max77541-adc" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, max77541_adc_platform_id);
|
||||
|
|
|
|||
|
|
@ -679,9 +679,9 @@ static void sun4i_gpadc_remove(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
static const struct platform_device_id sun4i_gpadc_id[] = {
|
||||
{ "sun4i-a10-gpadc-iio", (kernel_ulong_t)&sun4i_gpadc_data },
|
||||
{ "sun5i-a13-gpadc-iio", (kernel_ulong_t)&sun5i_gpadc_data },
|
||||
{ "sun6i-a31-gpadc-iio", (kernel_ulong_t)&sun6i_gpadc_data },
|
||||
{ .name = "sun4i-a10-gpadc-iio", .driver_data = (kernel_ulong_t)&sun4i_gpadc_data },
|
||||
{ .name = "sun5i-a13-gpadc-iio", .driver_data = (kernel_ulong_t)&sun5i_gpadc_data },
|
||||
{ .name = "sun6i-a31-gpadc-iio", .driver_data = (kernel_ulong_t)&sun6i_gpadc_data },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, sun4i_gpadc_id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user