Skip to content

Commit

Permalink
pinctrl: apple: Make it work as a module
Browse files Browse the repository at this point in the history
We need MODULE_DEVICE_TABLE for module autoloading to work, and
proper module ownership of the driver to have correct refcounts.

Signed-off-by: Hector Martin <marcan@marcan.st>
  • Loading branch information
marcan committed Mar 3, 2022
1 parent 80895eb commit 4ae85b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pinctrl/pinctrl-apple-gpio.c
Expand Up @@ -506,10 +506,12 @@ static const struct of_device_id apple_gpio_pinctrl_of_match[] = {
{ .compatible = "apple,pinctrl", },
{ }
};
MODULE_DEVICE_TABLE(of, apple_gpio_pinctrl_of_match);

static struct platform_driver apple_gpio_pinctrl_driver = {
.driver = {
.name = "apple-gpio-pinctrl",
.owner = THIS_MODULE,
.of_match_table = apple_gpio_pinctrl_of_match,
.suppress_bind_attrs = true,
},
Expand Down

0 comments on commit 4ae85b2

Please sign in to comment.