AGP 7/7: use pci_find_capability in sworks-agp.c
PATCH 1/1 AGP 7/7: use pci_find_capability in sworks-agp.c
# 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 [email protected] 1.978
# AGP: sworks - Use pci_find_capability.
# --------------------------------------------
#
drivers/char/agp/sworks-agp.c +1 -13
@@ -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,