diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-05-12 12:14:55 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-05-12 19:15:53 +0200 |
commit | cbfa9faea1f6cb2b5d271acb1d4a08295f075b87 (patch) | |
tree | c6b5738577b3832a33a086af8194f8f93ae33a88 /drivers/gpu/drm/drm_sysfs.c | |
parent | 4bb4637b26a28c724a9edaed2290ffed7e0dcc8f (diff) |
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: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r-- | drivers/gpu/drm/drm_sysfs.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 34e4fbcf44ba..487ddf5ffe51 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -312,17 +312,6 @@ static ssize_t tv_subconnector_show(struct device *device, uint64_t subconnector; 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; if (!prop) { DRM_ERROR("Unable to find subconnector property\n"); @@ -347,17 +336,6 @@ static ssize_t tv_select_subconnector_show(struct device *device, uint64_t subconnector; 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; if (!prop) { DRM_ERROR("Unable to find select subconnector property\n"); @@ -382,11 +360,6 @@ static ssize_t dvii_subconnector_show(struct device *device, uint64_t subconnector; 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; if (!prop) { DRM_ERROR("Unable to find subconnector property\n"); @@ -411,11 +384,6 @@ static ssize_t dvii_select_subconnector_show(struct device *device, uint64_t subconnector; 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; if (!prop) { DRM_ERROR("Unable to find select subconnector property\n"); |