From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Herrmann Subject: [PATCH 2/2] drm: rename agp_destroy() bus-cb to destroy() Date: Sat, 19 Oct 2013 13:58:20 +0200 Message-ID: <1382183900-19302-2-git-send-email-dh.herrmann@gmail.com> References: <1382183900-19302-1-git-send-email-dh.herrmann@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 22BFFE6A44 for ; Sat, 19 Oct 2013 04:58:42 -0700 (PDT) Received: by mail-ee0-f48.google.com with SMTP id e50so1400893eek.35 for ; Sat, 19 Oct 2013 04:58:42 -0700 (PDT) In-Reply-To: <1382183900-19302-1-git-send-email-dh.herrmann@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: Daniel Vetter List-Id: dri-devel@lists.freedesktop.org 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 --- 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