From 1b41975d9a49d4731eea9e2d9e684f31bd9c38ad Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Thu, 16 Sep 1999 19:47:46 +0000 Subject: [PATCH] PCI fixes for kernel 2.3.13 and later. Typo fixed in thmc50 which bit the compiler. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@566 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/busses/i2c-hydra.c | 6 ++++-- kernel/busses/i2c-voodoo3.c | 4 +++- kernel/chips/thmc50.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/busses/i2c-hydra.c b/kernel/busses/i2c-hydra.c index 3d71daf8..c8b2cea2 100644 --- a/kernel/busses/i2c-hydra.c +++ b/kernel/busses/i2c-hydra.c @@ -155,7 +155,7 @@ static int find_hydra(void) if (!pci_present()) return -ENODEV; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54)) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) dev = pci_find_device(VENDOR, DEVICE, NULL); if (!dev) { #else @@ -167,7 +167,9 @@ static int find_hydra(void) } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54)) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13) + base_addr = dev->resource[0].start; +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54)) base_addr = dev->base_address[0]; #else pcibios_read_config_dword(bus, devfn,PCI_BASE_ADDRESS_0,&base_addr); diff --git a/kernel/busses/i2c-voodoo3.c b/kernel/busses/i2c-voodoo3.c index 443c6f07..fbf201a1 100644 --- a/kernel/busses/i2c-voodoo3.c +++ b/kernel/busses/i2c-voodoo3.c @@ -418,7 +418,9 @@ void config_v3(struct pci_dev *dev, int num) unsigned int cadr; /* map Voodoo3 memory */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54)) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13) + cadr = dev->resource[0].start; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) cadr = dev->base_address[0]; #else pcibios_read_config_dword(dev->bus->number, dev->devfn, diff --git a/kernel/chips/thmc50.c b/kernel/chips/thmc50.c index dd051cb9..a0e9444a 100644 --- a/kernel/chips/thmc50.c +++ b/kernel/chips/thmc50.c @@ -191,7 +191,7 @@ int thmc50_detect(struct i2c_adapter *adapter, int address, int kind) const char *type_name,*client_name; #ifdef DEBUG - printk("thmc50.o: Probing for THMC50 at 0x%2.X on bus %d\n",address,adapter->id); + printk("thmc50.o: Probing for THMC50 at 0x%2X on bus %d\n",address,adapter->id); #endif /* Make sure we aren't probing the ISA bus!! This is just a safety check