summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-is31fl32xx.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-is31fl32xx.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 'drivers/leds/leds-is31fl32xx.c')
-rw-r--r--drivers/leds/leds-is31fl32xx.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c
index cd768f991da1..acf51e17e8df 100644
--- a/drivers/leds/leds-is31fl32xx.c
+++ b/drivers/leds/leds-is31fl32xx.c
@@ -428,17 +428,12 @@ static int is31fl32xx_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
const struct is31fl32xx_chipdef *cdef;
- const struct of_device_id *of_dev_id;
struct device *dev = &client->dev;
struct is31fl32xx_priv *priv;
int count;
int ret = 0;
- of_dev_id = of_match_device(of_is31fl32xx_match, dev);
- if (!of_dev_id)
- return -EINVAL;
-
- cdef = of_dev_id->data;
+ cdef = device_get_match_data(dev);
count = of_get_child_count(dev->of_node);
if (!count)