lkml.org 
[lkml]   [2003]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] AGP 7/7: use pci_find_capability in sworks-agp.c
Date
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.977 -> 1.978
# drivers/char/agp/sworks-agp.c 1.17 -> 1.18
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/01/07 bjorn_helgaas@hp.com 1.978
# AGP: sworks - Use pci_find_capability.
# --------------------------------------------
#
diff -Nru a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
--- a/drivers/char/agp/sworks-agp.c Tue Jan 7 12:52:58 2003
+++ b/drivers/char/agp/sworks-agp.c Tue Jan 7 12:52:58 2003
@@ -229,7 +229,6 @@
struct aper_size_info_lvl2 *current_size;
u32 temp;
u8 enable_reg;
- u8 cap_ptr;
u32 cap_id;
u16 cap_reg;

@@ -257,18 +256,7 @@
SVWRKS_AGP_ENABLE, enable_reg);
agp_bridge.tlb_flush(NULL);

- pci_read_config_byte(serverworks_private.svrwrks_dev, 0x34, &cap_ptr);
- if (cap_ptr != 0) {
- do {
- pci_read_config_dword(serverworks_private.svrwrks_dev,
- cap_ptr, &cap_id);
-
- if ((cap_id & 0xff) != 0x02)
- cap_ptr = (cap_id >> 8) & 0xff;
- }
- while (((cap_id & 0xff) != 0x02) && (cap_ptr != 0));
- }
- agp_bridge.capndx = cap_ptr;
+ agp_bridge.capndx = pci_find_capability(serverworks_private.svrwrks_dev, PCI_CAP_ID_AGP);

/* Fill in the mode register */
pci_read_config_dword(serverworks_private.svrwrks_dev,
-
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: 2005-03-22 13:32    [W:0.020 / U:1.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site