diff options
Diffstat (limited to 'src/northbridge/intel/sandybridge')
-rw-r--r-- | src/northbridge/intel/sandybridge/gma.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c index e79277c392..b68e705b32 100644 --- a/src/northbridge/intel/sandybridge/gma.c +++ b/src/northbridge/intel/sandybridge/gma.c @@ -640,24 +640,11 @@ static void gma_func0_init(struct device *dev) intel_gma_restore_opregion(); } -const struct i915_gpu_controller_info *intel_gma_get_controller_info(void) +static void gma_generate_ssdt(struct device *device) { - struct device *dev = pcidev_on_root(2, 0); - if (!dev) { - return NULL; - } - struct northbridge_intel_sandybridge_config *chip = dev->chip_info; - return &chip->gfx; -} - -static void gma_ssdt(struct device *device) -{ - const struct i915_gpu_controller_info *gfx = intel_gma_get_controller_info(); - if (!gfx) { - return; - } + const struct northbridge_intel_sandybridge_config *chip = device->chip_info; - drivers_intel_gma_displays_ssdt_generate(gfx); + drivers_intel_gma_displays_ssdt_generate(&chip->gfx); } static unsigned long gma_write_acpi_tables(struct device *const dev, unsigned long current, @@ -710,7 +697,7 @@ static struct device_operations gma_func0_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, - .acpi_fill_ssdt = gma_ssdt, + .acpi_fill_ssdt = gma_generate_ssdt, .init = gma_func0_init, .scan_bus = NULL, .enable = NULL, |