linux-stable/drivers/media/platform/vimc
Javier Martinez Canillas bb3abbb74e media: vimc: set id_table for platform drivers
The vimc platform drivers define a platform device ID table but these
are not set to the .id_table field in the platform driver structure.

So the platform device ID table is only used to fill the aliases in
the module but are not used for matching (works because the platform
subsystem fallbacks to the driver's name if no .id_table is set).

But this also means that the platform device ID table isn't used if
the driver is built-in, which leads to the following build warning:

This causes the following build warnings when the driver is built-in:

drivers/media/platform/vimc//vimc-capture.c:528:40: warning: ‘vimc_cap_driver_ids’ defined but not used [-Wunused-const-variable=]
 static const struct platform_device_id vimc_cap_driver_ids[] = {
                                        ^~~~~~~~~~~~~~~~~~~
drivers/media/platform/vimc//vimc-debayer.c:588:40: warning: ‘vimc_deb_driver_ids’ defined but not used [-Wunused-const-variable=]
 static const struct platform_device_id vimc_deb_driver_ids[] = {
                                        ^~~~~~~~~~~~~~~~~~~
drivers/media/platform/vimc//vimc-scaler.c:442:40: warning: ‘vimc_sca_driver_ids’ defined but not used [-Wunused-const-variable=]
 static const struct platform_device_id vimc_sca_driver_ids[] = {
                                        ^~~~~~~~~~~~~~~~~~~
drivers/media/platform/vimc//vimc-sensor.c:376:40: warning: ‘vimc_sen_driver_ids’ defined but not used [-Wunused-const-variable=]
 static const struct platform_device_id vimc_sen_driver_ids[] = {
                                        ^~~~~~~~~~~~~~~~~~~

Reported-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Suggested-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Helen Koike <helen.koike@collabora.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2017-07-17 11:26:56 -03:00
..
Kconfig
Makefile [media] vimc: sca: Add scaler 2017-06-23 09:15:16 -03:00
vimc-capture.c media: vimc: set id_table for platform drivers 2017-07-17 11:26:56 -03:00
vimc-common.c [media] vimc: sca: Add scaler 2017-06-23 09:15:16 -03:00
vimc-common.h [media] vimc: sca: Add scaler 2017-06-23 09:15:16 -03:00
vimc-core.c [media] vimc: Subdevices as modules 2017-06-23 09:12:07 -03:00
vimc-debayer.c media: vimc: set id_table for platform drivers 2017-07-17 11:26:56 -03:00
vimc-scaler.c media: vimc: set id_table for platform drivers 2017-07-17 11:26:56 -03:00
vimc-sensor.c media: vimc: set id_table for platform drivers 2017-07-17 11:26:56 -03:00