Skip to content

Commit 344f74c

Browse files
JC-WVgregkh
authored andcommitted
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>
1 parent 409c1cf commit 344f74c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/usb/typec/tipd/core.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,10 +1365,7 @@ static int tps6598x_probe(struct i2c_client *client)
13651365
TPS_REG_INT_PLUG_EVENT;
13661366
}
13671367

1368-
if (dev_fwnode(tps->dev))
1369-
tps->data = device_get_match_data(tps->dev);
1370-
else
1371-
tps->data = i2c_get_match_data(client);
1368+
tps->data = i2c_get_match_data(client);
13721369
if (!tps->data)
13731370
return -EINVAL;
13741371

0 commit comments

Comments
 (0)