All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: airlied@linux.ie, dri-devel@lists.freedesktop.org,
	linux-acpi@vger.kernel.org
Subject: [PATCH 1/3] acpi_video: fix leaking PCI references
Date: Tue, 24 Apr 2012 16:44:21 +0100	[thread overview]
Message-ID: <20120424154402.1575.90373.stgit@bluebook> (raw)

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)


             reply	other threads:[~2012-04-24 15:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 15:44 Alan Cox [this message]
2012-04-24 15:45 ` [PATCH 2/3] acpi_video: Intel video is not always i915 Alan Cox
2012-04-24 21:02   ` Matthew Garrett
2012-04-24 22:31     ` Alan Cox
2012-04-24 22:30       ` Matthew Garrett
2012-04-25 10:27         ` Alan Cox
2012-04-25 11:31           ` Matthew Garrett
2012-04-25 12:24             ` Alan Cox
2012-04-25 12:40               ` Matthew Garrett
2012-04-25 12:49                 ` Alan Cox
2012-04-25 12:48                   ` Matthew Garrett
2012-04-24 15:45 ` [PATCH 3/3] gma500: don't register the ACPI video bus Alan Cox
2012-04-25 13:33 [PATCH 1/3] acpi_video: fix leaking PCI references Alan Cox
2012-04-25 14:09 ` Matthew Garrett
2012-05-08  6:10 ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120424154402.1575.90373.stgit@bluebook \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.