lkml.org 
[lkml]   [2006]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm: remove pci domain local copy (02/07)
Dave Airlie wrote:
> Just call a function to retrieve the pci domain, this isn't exactly
> hotpath code.
>
> Signed-off-by: Dave Airlie <airlied@linux.ie>
> (cherry picked from 01852d755753bbfcd5434c55d4d7375580f8338f commit)
> ---
> drivers/char/drm/drmP.h | 10 +++++++++-
> drivers/char/drm/drm_ioctl.c | 4 ++--
> drivers/char/drm/drm_irq.c | 2 +-
> 3 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
> index 5c8f245..4dd28e1 100644
> --- a/drivers/char/drm/drmP.h
> +++ b/drivers/char/drm/drmP.h
> @@ -711,7 +711,6 @@ typedef struct drm_device {
> drm_agp_head_t *agp; /**< AGP data */
>
> struct pci_dev *pdev; /**< PCI device structure */
> - int pci_domain; /**< PCI bus domain number */
> #ifdef __alpha__
> struct pci_controller *hose;
> #endif
> @@ -733,6 +732,15 @@ static __inline__ int drm_core_check_fea

I would presume that hose goes away too?


> +static inline int drm_get_pci_domain(struct drm_device *dev)
> +{
> +#ifdef __alpha__
> + return dev->hose->bus->number;
> +#else
> + return 0;
> +#endif
> +}

Please use the always-present pci_domain_nr() rather than inventing a
DRM-specific function that does the same thing.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-22 18:37    [W:0.120 / U:5.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site