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

Configure Feed

Select the types of activity you want to include in your feed.

Input: tegra-kbc - use device_get_match_data()

Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20231006224432.442709-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Rob Herring and committed by
Dmitry Torokhov
6cd25669 787650cc

+2 -5
+2 -5
drivers/input/keyboard/tegra-kbc.c
··· 14 14 #include <linux/io.h> 15 15 #include <linux/interrupt.h> 16 16 #include <linux/of.h> 17 - #include <linux/of_device.h> 17 + #include <linux/property.h> 18 18 #include <linux/clk.h> 19 19 #include <linux/slab.h> 20 20 #include <linux/input/matrix_keypad.h> ··· 602 602 unsigned int debounce_cnt; 603 603 unsigned int scan_time_rows; 604 604 unsigned int keymap_rows; 605 - const struct of_device_id *match; 606 - 607 - match = of_match_device(tegra_kbc_of_match, &pdev->dev); 608 605 609 606 kbc = devm_kzalloc(&pdev->dev, sizeof(*kbc), GFP_KERNEL); 610 607 if (!kbc) { ··· 610 613 } 611 614 612 615 kbc->dev = &pdev->dev; 613 - kbc->hw_support = match->data; 616 + kbc->hw_support = device_get_match_data(&pdev->dev); 614 617 kbc->max_keys = kbc->hw_support->max_rows * 615 618 kbc->hw_support->max_columns; 616 619 kbc->num_rows_and_columns = kbc->hw_support->max_rows +