diff options
author | Javier Carrasco <javier.carrasco@wolfvision.net> | 2024-04-29 16:35:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-10 12:36:51 +0300 |
commit | 344f74cf531d90245e1296b3ffbaa7df99dd18f6 (patch) | |
tree | f94aaa74a97cda86f54aa07170c61ce42d2dfec5 /drivers/usb | |
parent | 409c1cfb5a803f3cf2d17aeaf75c25c4be951b07 (diff) | |
download | linux-344f74cf531d90245e1296b3ffbaa7df99dd18f6.tar.xz |
usb: typec: tipd: rely on i2c_get_match_data()
The first thing i2c_get_match_data() does is calling
device_get_match_data(), which already checks if there is a fwnode.
Remove explicit usage of device_get_match_data() as it is already
included in i2c_get_match_data().
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240429-tps6598x_fix_event_handling-v3-3-4e8e58dce489@wolfvision.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/typec/tipd/core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 191f86da283d..ad76dbd20e65 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -1365,10 +1365,7 @@ static int tps6598x_probe(struct i2c_client *client) TPS_REG_INT_PLUG_EVENT; } - if (dev_fwnode(tps->dev)) - tps->data = device_get_match_data(tps->dev); - else - tps->data = i2c_get_match_data(client); + tps->data = i2c_get_match_data(client); if (!tps->data) return -EINVAL; |