Skip to content

Commit

Permalink
led: max77650: add of_match table
Browse files Browse the repository at this point in the history
We need the of_match table if we want to use the compatible string in
the pmic's child node and get the led driver loaded automatically.

Signed-off-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Pavel Machek <[email protected]>
  • Loading branch information
brgl authored and pavelmachek committed Dec 21, 2019
1 parent 4c3718f commit b0ff986
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/leds/leds-max77650.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,16 @@ static int max77650_led_probe(struct platform_device *pdev)
return rv;
}

static const struct of_device_id max77650_led_of_match[] = {
{ .compatible = "maxim,max77650-led" },
{ }
};
MODULE_DEVICE_TABLE(of, max77650_led_of_match);

static struct platform_driver max77650_led_driver = {
.driver = {
.name = "max77650-led",
.of_match_table = max77650_led_of_match,
},
.probe = max77650_led_probe,
};
Expand Down

0 comments on commit b0ff986

Please sign in to comment.