dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Herrmann <dh.herrmann@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 2/2] drm: rename agp_destroy() bus-cb to destroy()
Date: Sat, 19 Oct 2013 13:58:20 +0200	[thread overview]
Message-ID: <1382183900-19302-2-git-send-email-dh.herrmann@gmail.com> (raw)
In-Reply-To: <1382183900-19302-1-git-send-email-dh.herrmann@gmail.com>

While the only user of agp_destroy() is the PCI-bus for agp-destruction,
this callback is not strictly bound to agp. Rename to destroy() to make
clear that any bus can use it to destroy resources once the device is
removed.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
Hi

We currently cannot remove the agp_destroy() callback as we have no bus-specific
destroy helpers (compared to bus-specific init helpers). I think we can change
that once we get the revoke/unplug series I'm working on. Until then, we have to
keep the current callbacks.

Feel free to drop it, I just thought the "agp_*" prefix was weird..

Thanks
David

 drivers/gpu/drm/drm_pci.c  | 2 +-
 drivers/gpu/drm/drm_stub.c | 4 ++--
 include/drm/drmP.h         | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 7d3435c..3e1c3a0 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -299,7 +299,7 @@ static struct drm_bus drm_pci_bus = {
 	.set_busid = drm_pci_set_busid,
 	.set_unique = drm_pci_set_unique,
 	.irq_by_busid = drm_pci_irq_by_busid,
-	.agp_destroy = drm_pci_agp_destroy,
+	.destroy = drm_pci_agp_destroy,
 };
 
 /**
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index ac211c3..c181b71 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -571,8 +571,8 @@ void drm_dev_unregister(struct drm_device *dev)
 	if (dev->driver->unload)
 		dev->driver->unload(dev);
 
-	if (dev->driver->bus->agp_destroy)
-		dev->driver->bus->agp_destroy(dev);
+	if (dev->driver->bus->destroy)
+		dev->driver->bus->destroy(dev);
 
 	drm_vblank_cleanup(dev);
 
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index dfc44ae..220013d 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -749,8 +749,7 @@ struct drm_bus {
 	int (*set_unique)(struct drm_device *dev, struct drm_master *master,
 			  struct drm_unique *unique);
 	int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p);
-	/* hooks that are for PCI */
-	void (*agp_destroy)(struct drm_device *dev);
+	void (*destroy)(struct drm_device *dev);
 
 };
 
-- 
1.8.4.1

  reply	other threads:[~2013-10-19 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-19 11:58 [PATCH 1/2] drm: remove agp_init() bus callback David Herrmann
2013-10-19 11:58 ` David Herrmann [this message]
2013-11-03 11:06 ` David Herrmann
2013-11-03 11:36   ` Daniel Vetter
2013-11-03 11:43     ` David Herrmann
2013-11-03 12:31       ` Daniel Vetter

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=1382183900-19302-2-git-send-email-dh.herrmann@gmail.com \
    --to=dh.herrmann@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox