usb: usb251xb: Use of_device_get_match_data()
authorStephen Boyd <swboyd@chromium.org>
Sat, 23 Jan 2021 03:44:26 +0000 (19:44 -0800)
committerRob Herring <robh@kernel.org>
Tue, 26 Jan 2021 18:17:32 +0000 (12:17 -0600)
commit9243eadc3a13c1332a80a8254e48865b09df5339
treef5b61e0996da4513e72212a77030b2c107b979f1
parentd825f0bea20f49a8f413a6acd7c4100ea55edf6d
usb: usb251xb: Use of_device_get_match_data()

Use the more modern API here instead of using of_match_device() and
avoid casting away const from the returned pointer by pushing the const
type through to the users. This nicely avoids referencing the match
table when it is undefined with configurations where CONFIG_OF=n and
avoids const issues.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Leitner <richard.leitner@skidata.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: <linux-usb@vger.kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210123034428.2841052-5-swboyd@chromium.org
drivers/usb/misc/usb251xb.c