|
@@ -123,19 +123,19 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data)
|
|
|
/**
|
|
|
* typec_mux_get - Find USB Type-C Multiplexer
|
|
|
* @dev: The caller device
|
|
|
+ * @name: Mux identifier
|
|
|
*
|
|
|
* Finds a mux linked to the caller. This function is primarily meant for the
|
|
|
* Type-C drivers. Returns a reference to the mux on success, NULL if no
|
|
|
* matching connection was found, or ERR_PTR(-EPROBE_DEFER) when a connection
|
|
|
* was found but the mux has not been enumerated yet.
|
|
|
*/
|
|
|
-struct typec_mux *typec_mux_get(struct device *dev)
|
|
|
+struct typec_mux *typec_mux_get(struct device *dev, const char *name)
|
|
|
{
|
|
|
struct typec_mux *mux;
|
|
|
|
|
|
mutex_lock(&mux_lock);
|
|
|
- mux = device_connection_find_match(dev, "typec-mux", NULL,
|
|
|
- typec_mux_match);
|
|
|
+ mux = device_connection_find_match(dev, name, NULL, typec_mux_match);
|
|
|
if (!IS_ERR_OR_NULL(mux))
|
|
|
get_device(mux->dev);
|
|
|
mutex_unlock(&mux_lock);
|