Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd80bdab

Browse files
Heikki Krogerusgregkh
Heikki Krogerus
authored andcommitted
usb: typec: mux: Drop support for device name matching
There are no more users for the old device connectiondescriptions that used device names.Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>Link:https://lore.kernel.org/r/20200211112531.86510-7-heikki.krogerus@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parentbbe80c9 commitd80bdab

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

‎drivers/usb/typec/mux.c‎

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717

1818
#include"bus.h"
1919

20-
staticintname_match(structdevice*dev,constvoid*name)
21-
{
22-
return !strcmp((constchar*)name,dev_name(dev));
23-
}
24-
2520
staticbooldev_name_ends_with(structdevice*dev,constchar*suffix)
2621
{
2722
constchar*name=dev_name(dev);
@@ -44,16 +39,11 @@ static void *typec_switch_match(struct device_connection *con, int ep,
4439
{
4540
structdevice*dev;
4641

47-
if (con->fwnode) {
48-
if (con->id&& !fwnode_property_present(con->fwnode,con->id))
49-
returnNULL;
42+
if (con->id&& !fwnode_property_present(con->fwnode,con->id))
43+
returnNULL;
5044

51-
dev=class_find_device(&typec_mux_class,NULL,con->fwnode,
52-
switch_fwnode_match);
53-
}else {
54-
dev=class_find_device(&typec_mux_class,NULL,
55-
con->endpoint[ep],name_match);
56-
}
45+
dev=class_find_device(&typec_mux_class,NULL,con->fwnode,
46+
switch_fwnode_match);
5747

5848
returndev ?to_typec_switch(dev) :ERR_PTR(-EPROBE_DEFER);
5949
}
@@ -191,13 +181,6 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data)
191181
u16*val;
192182
inti;
193183

194-
if (!con->fwnode) {
195-
dev=class_find_device(&typec_mux_class,NULL,
196-
con->endpoint[ep],name_match);
197-
198-
returndev ?to_typec_switch(dev) :ERR_PTR(-EPROBE_DEFER);
199-
}
200-
201184
/*
202185
* Check has the identifier already been "consumed". If it
203186
* has, no need to do any extra connection identification.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp