Commit c9180362 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

usb: typec: Replace custom implementation of device_match_fwnode()

parent fce703a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ static int switch_fwnode_match(struct device *dev, const void *fwnode)
	if (!is_typec_switch_dev(dev))
		return 0;

	return dev_fwnode(dev) == fwnode;
	return device_match_fwnode(dev, fwnode);
}

static void *typec_switch_match(struct fwnode_handle *fwnode, const char *id,
@@ -259,7 +259,7 @@ static int mux_fwnode_match(struct device *dev, const void *fwnode)
	if (!is_typec_mux_dev(dev))
		return 0;

	return dev_fwnode(dev) == fwnode;
	return device_match_fwnode(dev, fwnode);
}

static void *typec_mux_match(struct fwnode_handle *fwnode, const char *id,
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static bool dev_name_ends_with(struct device *dev, const char *suffix)

static int retimer_fwnode_match(struct device *dev, const void *fwnode)
{
	return dev_fwnode(dev) == fwnode && dev_name_ends_with(dev, "-retimer");
	return device_match_fwnode(dev, fwnode) && dev_name_ends_with(dev, "-retimer");
}

static void *typec_retimer_match(struct fwnode_handle *fwnode, const char *id, void *data)