summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-tlc591xx.c
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2020-09-18 00:32:52 +0200
committerPavel Machek <pavel@ucw.cz>2020-09-26 21:56:39 +0200
commit2779f4724b2ff0f296313e5987d10a6ec2c2ebd5 (patch)
treeac8871c440fd900f23dafe4781ffa101418091fc /drivers/leds/leds-tlc591xx.c
parentleds: ip30: compile if COMPILE_TEST=y (diff)
downloadlinux-2779f4724b2ff0f296313e5987d10a6ec2c2ebd5.tar.xz
linux-2779f4724b2ff0f296313e5987d10a6ec2c2ebd5.zip
leds: various: use device_get_match_data
Simply use device_get_match_data instead of matching against the match table again. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: David Rivshin <drivshin@allworx.com> Cc: Sebastian Reichel <sre@kernel.org> Cc: Christian Mauderer <oss@c-mauderer.de> Cc: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to '')
-rw-r--r--drivers/leds/leds-tlc591xx.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
index 1dc14051639c..aeedf1aa6297 100644
--- a/drivers/leds/leds-tlc591xx.c
+++ b/drivers/leds/leds-tlc591xx.c
@@ -150,16 +150,11 @@ tlc591xx_probe(struct i2c_client *client,
{
struct device_node *np = client->dev.of_node, *child;
struct device *dev = &client->dev;
- const struct of_device_id *match;
const struct tlc591xx *tlc591xx;
struct tlc591xx_priv *priv;
int err, count, reg;
- match = of_match_device(of_tlc591xx_leds_match, dev);
- if (!match)
- return -ENODEV;
-
- tlc591xx = match->data;
+ tlc591xx = device_get_match_data(dev);
if (!np)
return -ENODEV;