Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345142
b: refs/heads/master
c: c7362c4
h: refs/heads/master
v: v3
  • Loading branch information
Jani Nikula authored and Daniel Vetter committed Oct 22, 2012
1 parent 76ebdb4 commit fcd4fc2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29b99b4841cc15854475a299aceaa018e7a468f1
refs/heads/master: c7362c4dace5b61b28814fb61624f0ac069b08b0
17 changes: 14 additions & 3 deletions trunk/drivers/gpu/drm/i915/intel_lvds.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
#include <linux/acpi.h>

/* Private structure for the integrated LVDS support */
struct intel_lvds_connector {
struct intel_connector base;
};

struct intel_lvds_encoder {
struct intel_encoder base;

Expand All @@ -58,6 +62,11 @@ static struct intel_lvds_encoder *to_lvds_encoder(struct drm_encoder *encoder)
return container_of(encoder, struct intel_lvds_encoder, base.base);
}

static struct intel_lvds_connector *to_lvds_connector(struct drm_connector *connector)
{
return container_of(connector, struct intel_lvds_connector, base.base);
}

static struct intel_lvds_encoder *intel_attached_lvds(struct drm_connector *connector)
{
return container_of(intel_attached_encoder(connector),
Expand Down Expand Up @@ -906,6 +915,7 @@ bool intel_lvds_init(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_lvds_encoder *lvds_encoder;
struct intel_encoder *intel_encoder;
struct intel_lvds_connector *lvds_connector;
struct intel_connector *intel_connector;
struct drm_connector *connector;
struct drm_encoder *encoder;
Expand Down Expand Up @@ -941,8 +951,8 @@ bool intel_lvds_init(struct drm_device *dev)
if (!lvds_encoder)
return false;

intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL);
if (!intel_connector) {
lvds_connector = kzalloc(sizeof(struct intel_lvds_connector), GFP_KERNEL);
if (!lvds_connector) {
kfree(lvds_encoder);
return false;
}
Expand All @@ -953,6 +963,7 @@ bool intel_lvds_init(struct drm_device *dev)

intel_encoder = &lvds_encoder->base;
encoder = &intel_encoder->base;
intel_connector = &lvds_connector->base;
connector = &intel_connector->base;
drm_connector_init(dev, &intel_connector->base, &intel_lvds_connector_funcs,
DRM_MODE_CONNECTOR_LVDS);
Expand Down Expand Up @@ -1103,6 +1114,6 @@ bool intel_lvds_init(struct drm_device *dev)
drm_connector_cleanup(connector);
drm_encoder_cleanup(encoder);
kfree(lvds_encoder);
kfree(intel_connector);
kfree(lvds_connector);
return false;
}

0 comments on commit fcd4fc2

Please sign in to comment.