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

usb: chipidea: Fix unused ci_hdrc_usb2_of_match warning for !CONFIG_OF

Commit 14485de431b0 ("usb: Use device_get_match_data()") dropped the
unconditional use of ci_hdrc_usb2_of_match resulting in this warning:

drivers/usb/chipidea/ci_hdrc_usb2.c:41:34: warning: unused variable 'ci_hdrc_usb2_of_match' [-Wunused-const-variable]

The fix is to drop of_match_ptr() which is not necessary because DT is
always used for this driver.

Fixes: 14485de431b0 ("usb: Use device_get_match_data()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310131627.M43j234A-lkp@intel.com/
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20231019183015.841460-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rob Herring and committed by
Greg Kroah-Hartman
cf36d7db 70f13579

+1 -1
+1 -1
drivers/usb/chipidea/ci_hdrc_usb2.c
··· 119 119 .remove_new = ci_hdrc_usb2_remove, 120 120 .driver = { 121 121 .name = "chipidea-usb2", 122 - .of_match_table = of_match_ptr(ci_hdrc_usb2_of_match), 122 + .of_match_table = ci_hdrc_usb2_of_match, 123 123 }, 124 124 }; 125 125 module_platform_driver(ci_hdrc_usb2_driver);