linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] acpi_video: fix leaking PCI references
@ 2012-04-25 13:33 Alan Cox
  2012-04-25 13:33 ` [PATCH 2/3] acpi_video: Intel video is not always i915 Alan Cox
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alan Cox @ 2012-04-25 13:33 UTC (permalink / raw)
  To: airlied, dri-devel, linux-acpi

From: Alan Cox <alan@linux.intel.com>

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/acpi/video.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 9577b6f..66e8f73 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1745,6 +1745,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
 
 static int __init intel_opregion_present(void)
 {
+	int i915 = 0;
 #if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE)
 	struct pci_dev *dev = NULL;
 	u32 address;
@@ -1757,10 +1758,10 @@ static int __init intel_opregion_present(void)
 		pci_read_config_dword(dev, 0xfc, &address);
 		if (!address)
 			continue;
-		return 1;
+		i915 = 1;
 	}
 #endif
-	return 0;
+	return i915;
 }
 
 int acpi_video_register(void)


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH 1/3] acpi_video: fix leaking PCI references
@ 2012-04-24 15:44 Alan Cox
  2012-04-24 15:45 ` [PATCH 3/3] gma500: don't register the ACPI video bus Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2012-04-24 15:44 UTC (permalink / raw)
  To: airlied, dri-devel, linux-acpi

From: Alan Cox <alan@linux.intel.com>

Otherwise we keep a bogus pci reference to the GPU

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/acpi/video.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 9577b6f..66e8f73 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1745,6 +1745,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
 
 static int __init intel_opregion_present(void)
 {
+	int i915 = 0;
 #if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE)
 	struct pci_dev *dev = NULL;
 	u32 address;
@@ -1757,10 +1758,10 @@ static int __init intel_opregion_present(void)
 		pci_read_config_dword(dev, 0xfc, &address);
 		if (!address)
 			continue;
-		return 1;
+		i915 = 1;
 	}
 #endif
-	return 0;
+	return i915;
 }
 
 int acpi_video_register(void)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-05-08  6:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-25 13:33 [PATCH 1/3] acpi_video: fix leaking PCI references Alan Cox
2012-04-25 13:33 ` [PATCH 2/3] acpi_video: Intel video is not always i915 Alan Cox
2012-04-25 13:34 ` [PATCH 3/3] gma500: don't register the ACPI video bus Alan Cox
2012-04-25 14:09 ` [PATCH 1/3] acpi_video: fix leaking PCI references Matthew Garrett
2012-05-08  6:10 ` Len Brown
  -- strict thread matches above, loose matches on Subject: below --
2012-04-24 15:44 Alan Cox
2012-04-24 15:45 ` [PATCH 3/3] gma500: don't register the ACPI video bus Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).