File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -1740,18 +1740,6 @@ static struct attribute *switch_attrs[] = {
1740
1740
NULL ,
1741
1741
};
1742
1742
1743
- static bool has_port (const struct tb_switch * sw , enum tb_port_type type )
1744
- {
1745
- const struct tb_port * port ;
1746
-
1747
- tb_switch_for_each_port (sw , port ) {
1748
- if (!port -> disabled && port -> config .type == type )
1749
- return true;
1750
- }
1751
-
1752
- return false;
1753
- }
1754
-
1755
1743
static umode_t switch_attr_is_visible (struct kobject * kobj ,
1756
1744
struct attribute * attr , int n )
1757
1745
{
@@ -1760,8 +1748,7 @@ static umode_t switch_attr_is_visible(struct kobject *kobj,
1760
1748
1761
1749
if (attr == & dev_attr_authorized .attr ) {
1762
1750
if (sw -> tb -> security_level == TB_SECURITY_NOPCIE ||
1763
- sw -> tb -> security_level == TB_SECURITY_DPONLY ||
1764
- !has_port (sw , TB_TYPE_PCIE_UP ))
1751
+ sw -> tb -> security_level == TB_SECURITY_DPONLY )
1765
1752
return 0 ;
1766
1753
} else if (attr == & dev_attr_device .attr ) {
1767
1754
if (!sw -> device )
You can’t perform that action at this time.
0 commit comments