leds: pca953x: Use of_device_get_match_data()
authorStephen Boyd <swboyd@chromium.org>
Fri, 4 Oct 2019 21:43:25 +0000 (14:43 -0700)
committerPavel <pavel@ucw.cz>
Sun, 3 Nov 2019 16:39:00 +0000 (17:39 +0100)
commit66c41131daba0985464d8eb88092908c023ecb66
treeb6f7b1e538d968fdf30106f6236f48601fa64db7
parent9cc93be7b0c91a87ef452457c706af62741249d7
leds: pca953x: Use of_device_get_match_data()

This driver can use the of_device_get_match_data() API to simplify the
code. Replace calls to of_match_device() with this newer API under the
assumption that where it is called will be when we know the device is
backed by a DT node. This nicely avoids referencing the match table when
it is undefined with configurations where CONFIG_OF=n.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: <linux-leds@vger.kernel.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-pca9532.c