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

pinctrl: tegra: xusb: Add note about legacy status

Add a comment about why the call to of_match_node() cannot be replaced
by of_device_get_match_data(). This will hopefully prevent people from
attempting to clean this up in the future.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20190923095400.GA11084@ulmo
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Thierry Reding and committed by
Linus Walleij
9978339a 5ff8aca9

+6
+6
drivers/pinctrl/tegra/pinctrl-tegra-xusb.c
··· 885 885 mutex_init(&padctl->lock); 886 886 padctl->dev = &pdev->dev; 887 887 888 + /* 889 + * Note that we can't replace this by of_device_get_match_data() 890 + * because we need the separate matching table for this legacy code on 891 + * Tegra124. of_device_get_match_data() would attempt to use the table 892 + * from the updated driver and fail. 893 + */ 888 894 match = of_match_node(tegra_xusb_padctl_of_match, pdev->dev.of_node); 889 895 padctl->soc = match->data; 890 896