diff options
author | Biju Das <[email protected]> | 2023-09-02 09:22:25 +0100 |
---|---|---|
committer | Linus Walleij <[email protected]> | 2023-09-12 09:56:54 +0200 |
commit | 71567fbd1d33ecda0d75463397c9f3c76065dbbd (patch) | |
tree | 1893ca4cf2af4ff4708d95623277583703b99528 | |
parent | 68a2f05fec4939922aef6710d55c14398a5825f3 (diff) |
pinctrl: cy8c95x0: Simplify probe()
Simpilfy probe() by replacing device_get_match_data() and ID lookup for
retrieving match data by i2c_get_match_data().
Signed-off-by: Biju Das <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
-rw-r--r-- | drivers/pinctrl/pinctrl-cy8c95x0.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c index 58ca6fac7849..fae80b52a6fc 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -1346,9 +1346,7 @@ static int cy8c95x0_probe(struct i2c_client *client) chip->dev = &client->dev; /* Set the device type */ - chip->driver_data = (unsigned long)device_get_match_data(&client->dev); - if (!chip->driver_data) - chip->driver_data = i2c_match_id(cy8c95x0_id, client)->driver_data; + chip->driver_data = (uintptr_t)i2c_get_match_data(client); if (!chip->driver_data) return -ENODEV; |