Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: max77650: add of_match table

We need the of_match table if we want to use the compatible string in
the pmic's child node and get the regulator driver loaded automatically.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20191210100725.11005-1-brgl@bgdev.pl
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Bartosz Golaszewski and committed by
Mark Brown
100a2110 6d30fc51

+7
+7
drivers/regulator/max77650-regulator.c
··· 386 386 return 0; 387 387 } 388 388 389 + static const struct of_device_id max77650_regulator_of_match[] = { 390 + { .compatible = "maxim,max77650-regulator" }, 391 + { } 392 + }; 393 + MODULE_DEVICE_TABLE(of, max77650_regulator_of_match); 394 + 389 395 static struct platform_driver max77650_regulator_driver = { 390 396 .driver = { 391 397 .name = "max77650-regulator", 398 + .of_match_table = max77650_regulator_of_match, 392 399 }, 393 400 .probe = max77650_regulator_probe, 394 401 };