Commit cbfa9fae authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter

drm/sysfs: remove unnecessary connector type checks

These attributes should be exposed for the matching connector types
only, so checking is redundant.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 4bb4637b
...@@ -312,17 +312,6 @@ static ssize_t tv_subconnector_show(struct device *device, ...@@ -312,17 +312,6 @@ static ssize_t tv_subconnector_show(struct device *device,
uint64_t subconnector; uint64_t subconnector;
int ret; int ret;
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_Composite:
case DRM_MODE_CONNECTOR_SVIDEO:
case DRM_MODE_CONNECTOR_Component:
case DRM_MODE_CONNECTOR_TV:
break;
default:
DRM_ERROR("Wrong connector type for this property\n");
return 0;
}
prop = dev->mode_config.tv_subconnector_property; prop = dev->mode_config.tv_subconnector_property;
if (!prop) { if (!prop) {
DRM_ERROR("Unable to find subconnector property\n"); DRM_ERROR("Unable to find subconnector property\n");
...@@ -347,17 +336,6 @@ static ssize_t tv_select_subconnector_show(struct device *device, ...@@ -347,17 +336,6 @@ static ssize_t tv_select_subconnector_show(struct device *device,
uint64_t subconnector; uint64_t subconnector;
int ret; int ret;
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_Composite:
case DRM_MODE_CONNECTOR_SVIDEO:
case DRM_MODE_CONNECTOR_Component:
case DRM_MODE_CONNECTOR_TV:
break;
default:
DRM_ERROR("Wrong connector type for this property\n");
return 0;
}
prop = dev->mode_config.tv_select_subconnector_property; prop = dev->mode_config.tv_select_subconnector_property;
if (!prop) { if (!prop) {
DRM_ERROR("Unable to find select subconnector property\n"); DRM_ERROR("Unable to find select subconnector property\n");
...@@ -382,11 +360,6 @@ static ssize_t dvii_subconnector_show(struct device *device, ...@@ -382,11 +360,6 @@ static ssize_t dvii_subconnector_show(struct device *device,
uint64_t subconnector; uint64_t subconnector;
int ret; int ret;
if (connector->connector_type != DRM_MODE_CONNECTOR_DVII) {
DRM_ERROR("Wrong connector type for this property\n");
return 0;
}
prop = dev->mode_config.dvi_i_subconnector_property; prop = dev->mode_config.dvi_i_subconnector_property;
if (!prop) { if (!prop) {
DRM_ERROR("Unable to find subconnector property\n"); DRM_ERROR("Unable to find subconnector property\n");
...@@ -411,11 +384,6 @@ static ssize_t dvii_select_subconnector_show(struct device *device, ...@@ -411,11 +384,6 @@ static ssize_t dvii_select_subconnector_show(struct device *device,
uint64_t subconnector; uint64_t subconnector;
int ret; int ret;
if (connector->connector_type != DRM_MODE_CONNECTOR_DVII) {
DRM_ERROR("Wrong connector type for this property\n");
return 0;
}
prop = dev->mode_config.dvi_i_select_subconnector_property; prop = dev->mode_config.dvi_i_select_subconnector_property;
if (!prop) { if (!prop) {
DRM_ERROR("Unable to find select subconnector property\n"); DRM_ERROR("Unable to find select subconnector property\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment