|
@@ -4028,24 +4028,14 @@ static ssize_t i915_displayport_test_active_write(struct file *file,
|
|
|
{
|
|
|
char *input_buffer;
|
|
|
int status = 0;
|
|
|
- struct seq_file *m;
|
|
|
struct drm_device *dev;
|
|
|
struct drm_connector *connector;
|
|
|
struct list_head *connector_list;
|
|
|
struct intel_dp *intel_dp;
|
|
|
int val = 0;
|
|
|
|
|
|
- m = file->private_data;
|
|
|
- if (!m) {
|
|
|
- status = -ENODEV;
|
|
|
- return status;
|
|
|
- }
|
|
|
- dev = m->private;
|
|
|
+ dev = ((struct seq_file *)file->private_data)->private;
|
|
|
|
|
|
- if (!dev) {
|
|
|
- status = -ENODEV;
|
|
|
- return status;
|
|
|
- }
|
|
|
connector_list = &dev->mode_config.connector_list;
|
|
|
|
|
|
if (len == 0)
|
|
@@ -4103,9 +4093,6 @@ static int i915_displayport_test_active_show(struct seq_file *m, void *data)
|
|
|
struct list_head *connector_list = &dev->mode_config.connector_list;
|
|
|
struct intel_dp *intel_dp;
|
|
|
|
|
|
- if (!dev)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
list_for_each_entry(connector, connector_list, head) {
|
|
|
|
|
|
if (connector->connector_type !=
|
|
@@ -4150,9 +4137,6 @@ static int i915_displayport_test_data_show(struct seq_file *m, void *data)
|
|
|
struct list_head *connector_list = &dev->mode_config.connector_list;
|
|
|
struct intel_dp *intel_dp;
|
|
|
|
|
|
- if (!dev)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
list_for_each_entry(connector, connector_list, head) {
|
|
|
|
|
|
if (connector->connector_type !=
|
|
@@ -4192,9 +4176,6 @@ static int i915_displayport_test_type_show(struct seq_file *m, void *data)
|
|
|
struct list_head *connector_list = &dev->mode_config.connector_list;
|
|
|
struct intel_dp *intel_dp;
|
|
|
|
|
|
- if (!dev)
|
|
|
- return -ENODEV;
|
|
|
-
|
|
|
list_for_each_entry(connector, connector_list, head) {
|
|
|
|
|
|
if (connector->connector_type !=
|