Changeset 704
- Timestamp:
- 01/24/00 20:30:08 (13 years ago)
- Location:
- lm-sensors/trunk/kernel
- Files:
-
- 27 modified
-
busses/i2c-ali15x3.c (modified) (3 diffs)
-
busses/i2c-amd756.c (modified) (4 diffs)
-
busses/i2c-hydra.c (modified) (4 diffs)
-
busses/i2c-i801.c (modified) (4 diffs)
-
busses/i2c-isa.c (modified) (1 diff)
-
busses/i2c-piix4.c (modified) (4 diffs)
-
busses/i2c-sis5595.c (modified) (3 diffs)
-
busses/i2c-via.c (modified) (3 diffs)
-
busses/i2c-viapro.c (modified) (4 diffs)
-
busses/i2c-voodoo3.c (modified) (2 diffs)
-
chips/adm1021.c (modified) (1 diff)
-
chips/adm9240.c (modified) (1 diff)
-
chips/bt869.c (modified) (1 diff)
-
chips/eeprom.c (modified) (1 diff)
-
chips/gl518sm.c (modified) (9 diffs)
-
chips/gl520sm.c (modified) (1 diff)
-
chips/icspll.c (modified) (1 diff)
-
chips/lm75.c (modified) (1 diff)
-
chips/lm78.c (modified) (1 diff)
-
chips/lm80.c (modified) (1 diff)
-
chips/ltc1710.c (modified) (1 diff)
-
chips/matorb.c (modified) (1 diff)
-
chips/maxilife.c (modified) (1 diff)
-
chips/sis5595.c (modified) (4 diffs)
-
chips/thmc50.c (modified) (1 diff)
-
chips/w83781d.c (modified) (1 diff)
-
sensors.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/kernel/busses/i2c-ali15x3.c
r689 r704 73 73 #include "compat.h" 74 74 75 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54))76 #include <linux/bios32.h>77 #endif78 79 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)80 75 #include <linux/init.h> 81 #else82 #define __init83 #define __initdata84 #endif85 76 86 77 #undef FORCE_ALI15X3_ENABLE … … 195 186 unsigned char temp; 196 187 197 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))198 188 struct pci_dev *ALI15X3_dev; 199 #else200 unsigned char ALI15X3_bus, ALI15X3_devfn = 0;201 int res;202 #endif203 189 204 190 /* First check whether we can access PCI at all */ … … 210 196 211 197 /* Look for the ALI15X3, M7101 device */ 212 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))213 198 ALI15X3_dev = NULL; 214 199 ALI15X3_dev = pci_find_device(PCI_VENDOR_ID_AL, 215 200 PCI_DEVICE_ID_AL_M7101, ALI15X3_dev); 216 201 if(ALI15X3_dev == NULL) { 217 #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */218 res = pcibios_find_device(PCI_VENDOR_ID_AL,219 PCI_DEVICE_ID_AL_M7101,220 0,&ALI15X3_bus, &ALI15X3_devfn);221 222 if (res) {223 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */224 202 printk("i2c-ali15x3.o: Error: Can't detect ali15x3!\n"); 225 203 error_return=-ENODEV; -
lm-sensors/trunk/kernel/busses/i2c-amd756.c
r658 r704 39 39 #include "compat.h" 40 40 41 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54))42 #include <linux/bios32.h>43 #endif44 45 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)46 41 #include <linux/init.h> 47 #else48 #define __init49 #define __initdata50 #endif51 42 52 43 /* AMD756 SMBus address offsets */ … … 145 136 unsigned char temp; 146 137 147 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))148 138 struct pci_dev *AMD756_dev; 149 #else150 unsigned char AMD756_bus, AMD756_devfn;151 int i,res;152 #endif153 139 154 140 /* First check whether we can access PCI at all */ … … 160 146 161 147 /* Look for the AMD756, function 3 */ 162 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))163 148 /* Note: we keep on searching until we have found 'function 3' */ 164 149 AMD756_dev = NULL; … … 168 153 while (AMD756_dev && (PCI_FUNC(AMD756_dev->devfn) != 3)); 169 154 if(AMD756_dev == NULL) { 170 #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */171 for (i = 0;172 ! (res = pcibios_find_device(PCI_VENDOR_ID_INTEL,173 PCI_DEVICE_ID_INTEL_82371AB_3,174 i,&AMD756_bus, &AMD756_devfn)) &&175 PCI_FUNC(AMD756_devfn) != 3;176 i++);177 178 if (res) {179 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */180 155 printk("i2c-amd756.o: Error: Can't detect AMD756, function 3!\n"); 181 156 error_return=-ENODEV; -
lm-sensors/trunk/kernel/busses/i2c-hydra.c
r647 r704 37 37 #include "compat.h" 38 38 39 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54))40 #include <linux/bios32.h>41 #endif42 43 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)44 39 #include <linux/init.h> 45 #else46 #define __init47 #define __initdata48 #endif49 40 50 41 /* PCI device */ … … 146 137 static int find_hydra(void) 147 138 { 148 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))149 139 struct pci_dev *dev; 150 #else151 unsigned char bus, devfn;152 int res;153 #endif154 140 unsigned int base_addr; 155 141 … … 157 143 return -ENODEV; 158 144 159 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54)160 145 dev = pci_find_device(VENDOR, DEVICE, NULL); 161 146 if (!dev) { 162 #else163 res = pcibios_find_device(VENDOR,DEVICE,0,&bus, &devfn);164 if (res) {165 #endif166 147 printk("Hydra not found\n"); 167 148 return -ENODEV; … … 171 152 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13) 172 153 base_addr = dev->resource[0].start; 173 #el if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))154 #else 174 155 base_addr = dev->base_address[0]; 175 #else176 pcibios_read_config_dword(bus, devfn,PCI_BASE_ADDRESS_0,&base_addr);177 156 #endif 178 157 hydra_base = (unsigned long)ioremap(base_addr, 0x100); -
lm-sensors/trunk/kernel/busses/i2c-i801.c
r689 r704 40 40 #include "compat.h" 41 41 42 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54))43 #include <linux/bios32.h>44 #endif45 46 42 /* I801 SMBus address offsets */ 47 43 #define SMBHSTSTS (0 + i801_smba) … … 139 135 unsigned char temp; 140 136 141 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))142 137 struct pci_dev *I801_dev; 143 #else144 unsigned char I801_bus, I801_devfn;145 int i,res;146 #endif147 138 148 139 /* First check whether we can access PCI at all */ … … 155 146 /* Look for the I801, function 3 */ 156 147 /* Have to check for both the 82801AA and 82801AB */ 157 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))158 148 /* Note: we keep on searching until we have found 'function 3' */ 159 149 I801_dev = NULL; … … 169 159 } 170 160 if(I801_dev == NULL) { 171 #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */172 for (i = 0;173 ! (res = pcibios_find_device(PCI_VENDOR_ID_INTEL,174 PCI_DEVICE_ID_INTEL_82801AA_3,175 i,&I801_bus, &I801_devfn)) &&176 PCI_FUNC(I801_devfn) != 3;177 i++);178 if (res) {179 for (i = 0;180 ! (res = pcibios_find_device(PCI_VENDOR_ID_INTEL,181 PCI_DEVICE_ID_INTEL_82801AB_3,182 i,&I801_bus, &I801_devfn)) &&183 PCI_FUNC(I801_devfn) != 3;184 i++);185 }186 if (res) {187 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */188 161 printk("i2c-i801.o: Error: Can't detect I801, function 3!\n"); 189 162 error_return=-ENODEV; -
lm-sensors/trunk/kernel/busses/i2c-isa.c
r645 r704 33 33 #include "compat.h" 34 34 35 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)36 35 #include <linux/init.h> 37 #else38 #define __init39 #define __initdata40 #endif41 36 42 37 #include "version.h" -
lm-sensors/trunk/kernel/busses/i2c-piix4.c
r653 r704 34 34 #include "compat.h" 35 35 36 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54))37 #include <linux/bios32.h>38 #endif39 40 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)41 36 #include <linux/init.h> 42 #else43 #define __init44 #define __initdata45 #endif46 37 47 38 /* PIIX4 SMBus address offsets */ … … 150 141 unsigned char temp; 151 142 152 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))153 143 struct pci_dev *PIIX4_dev; 154 #else155 unsigned char PIIX4_bus, PIIX4_devfn;156 int i,res;157 #endif158 144 159 145 /* First check whether we can access PCI at all */ … … 165 151 166 152 /* Look for the PIIX4, function 3 */ 167 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))168 153 /* Note: we keep on searching until we have found 'function 3' */ 169 154 PIIX4_dev = NULL; … … 173 158 while(PIIX4_dev && (PCI_FUNC(PIIX4_dev->devfn) != 3)); 174 159 if(PIIX4_dev == NULL) { 175 #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */176 for (i = 0;177 ! (res = pcibios_find_device(PCI_VENDOR_ID_INTEL,178 PCI_DEVICE_ID_INTEL_82371AB_3,179 i,&PIIX4_bus, &PIIX4_devfn)) &&180 PCI_FUNC(PIIX4_devfn) != 3;181 i++);182 183 if (res) {184 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */185 160 printk("i2c-piix4.o: Error: Can't detect PIIX4, function 3!\n"); 186 161 error_return=-ENODEV; -
lm-sensors/trunk/kernel/busses/i2c-sis5595.c
r674 r704 39 39 #include "compat.h" 40 40 41 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54))42 #include <linux/bios32.h>43 #endif44 45 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)46 41 #include <linux/init.h> 47 #else48 #define __init49 #define __initdata50 #endif51 42 52 43 /* SIS5595 SMBus registers */ … … 151 142 int error_return=0; 152 143 153 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))154 144 struct pci_dev *SIS5595_dev; 155 #else156 unsigned char SIS5595_bus, SIS5595_devfn;157 int i,res;158 #endif159 145 160 146 /* First check whether we can access PCI at all */ … … 166 152 167 153 /* Look for the SIS5595, function 3 */ 168 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))169 154 SIS5595_dev = NULL; 170 155 if (!(SIS5595_dev = pci_find_device(PCI_VENDOR_ID_SI, 171 156 PCI_DEVICE_ID_SI_503, SIS5595_dev))) { 172 #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */173 if ((res = pcibios_find_device(PCI_VENDOR_ID_SI,174 PCI_DEVICE_ID_SI_503,175 i,&SIS5595_bus, &SIS5595_devfn))) {176 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */177 157 printk("i2c-sis5595.o: Error: Can't detect SIS5595!\n"); 178 158 error_return=-ENODEV; -
lm-sensors/trunk/kernel/busses/i2c-via.c
r647 r704 30 30 #include <linux/types.h> 31 31 32 #if LINUX_VERSION_CODE < 0x020136 /* 2.1.54 */33 #include <linux/bios32.h>34 #endif35 36 32 #include <linux/i2c.h> 37 33 #include <linux/i2c-algo-bit.h> 38 34 #include "compat.h" 39 35 40 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)41 36 #include <linux/init.h> 42 #else43 #define __init44 #define __initdata45 #endif46 37 47 38 /* PCI device */ … … 128 119 129 120 /* When exactly was the new pci interface introduced? */ 130 #if LINUX_VERSION_CODE >= 0x020136 /* 2.1.54 */131 121 static int find_via(void) 132 122 { … … 169 159 } 170 160 171 #else172 173 static int find_via(void)174 {175 unsigned char VIA_bus, VIA_devfn;176 u16 base;177 u8 rev;178 179 if (! pcibios_present())180 return -ENODEV;181 182 if(pcibios_find_device(VENDOR, DEVICE, 0, &VIA_bus, &VIA_devfn))183 {184 printk("vt82c586b not found\n");185 return -ENODEV;186 }187 188 if ( PCIBIOS_SUCCESSFUL !=189 pcibios_read_config_byte(VIA_bus, VIA_devfn,190 PM_CFG_REVID, &rev))191 return -ENODEV;192 193 switch(rev)194 {195 case 0x00: base = PM_CFG_IOBASE0;196 break;197 case 0x01:198 case 0x10: base = PM_CFG_IOBASE1;199 break;200 201 default : base = PM_CFG_IOBASE1;202 /* later revision */203 }204 205 if ( PCIBIOS_SUCCESSFUL !=206 pcibios_read_config_word(VIA_bus, VIA_devfn, base, &pm_io_base))207 return -ENODEV;208 209 pm_io_base &= (0xff<<8);210 return 0;211 }212 #endif213 214 161 #ifdef MODULE 215 162 static -
lm-sensors/trunk/kernel/busses/i2c-viapro.c
r645 r704 34 34 #include "compat.h" 35 35 36 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54))37 #include <linux/bios32.h>38 #endif39 40 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)41 36 #include <linux/init.h> 42 #else43 #define __init44 #define __initdata45 #endif46 47 37 48 38 #ifndef PCI_DEVICE_ID_VIA_82C596_3 … … 167 157 unsigned char temp; 168 158 169 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))170 159 struct pci_dev *VT596_dev; 171 #else172 unsigned char VT596_bus, VT596_devfn;173 int i,res;174 #endif175 160 176 161 /* First check whether we can access PCI at all */ … … 182 167 183 168 /* Look for the VT596 function 3 _or_ VT686 function 4 */ 184 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))185 169 VT596_dev = NULL; 186 170 VT596_dev = pci_find_device(PCI_VENDOR_ID_VIA, … … 191 175 192 176 if (VT596_dev == NULL) { 193 #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */194 for (i = 0;195 ! (res = pcibios_find_device(PCI_VENDOR_ID_VIA,196 PCI_DEVICE_ID_VIA_82C596_3,197 i,&VT596_bus, &VT596_devfn)) &&198 PCI_FUNC(VT596_devfn) != 3;199 i++);200 201 if (res)202 for (i = 0;203 ! (res = pcibios_find_device(PCI_VENDOR_ID_VIA,204 PCI_DEVICE_ID_VIA_82C686_4,205 i,&VT596_bus, &VT596_devfn)) &&206 PCI_FUNC(VT596_devfn) != 4;207 i++);208 209 if (res) {210 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */211 177 printk("i2c-viapro.o: Error: Can't detect vt82c596 or vt82c686"); 212 178 error_return=-ENODEV; -
lm-sensors/trunk/kernel/busses/i2c-voodoo3.c
r698 r704 43 43 #include "compat.h" 44 44 45 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54))46 #include <linux/bios32.h>47 #endif48 49 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)50 45 #include <linux/init.h> 51 #else52 #define __init53 #define __initdata54 #endif55 46 56 47 /* 3DFX defines */ 57 #ifndef PCI_VENDOR_ID_3DFX58 #define PCI_VENDOR_ID_3DFX 0x121a59 #endif60 48 #ifndef PCI_DEVICE_ID_3DFX_VOODOO3 61 49 #define PCI_DEVICE_ID_3DFX_VOODOO3 0x05 62 #endif63 #ifndef PCI_DEVICE_ID_3DFX_BANSHEE64 #define PCI_DEVICE_ID_3DFX_BANSHEE 0x0365 50 #endif 66 51 … … 681 666 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13) 682 667 cadr = dev->resource[0].start; 683 #el if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54)668 #else 684 669 cadr = dev->base_address[0]; 685 #else686 pcibios_read_config_dword(dev->bus->number, dev->devfn,687 PCI_BASE_ADDRESS_0,&cadr);688 670 #endif 689 671 cadr&=PCI_BASE_ADDRESS_MEM_MASK; -
lm-sensors/trunk/kernel/chips/adm1021.c
r667 r704 29 29 #include "compat.h" 30 30 31 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)32 31 #include <linux/init.h> 33 #else34 #define __init35 #define __initdata36 #endif37 32 38 33 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/adm9240.c
r667 r704 63 63 #include "sensors.h" 64 64 #include "compat.h" 65 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)66 65 #include <linux/init.h> 67 #else68 #define __init69 #define __initdata70 #endif71 66 72 67 -
lm-sensors/trunk/kernel/chips/bt869.c
r667 r704 30 30 #include "version.h" 31 31 #include "compat.h" 32 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)33 32 #include <linux/init.h> 34 #else35 #define __init36 #define __initdata37 #endif38 33 39 34 -
lm-sensors/trunk/kernel/chips/eeprom.c
r667 r704 29 29 #include "compat.h" 30 30 31 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)32 31 #include <linux/init.h> 33 #else34 #define __init35 #define __initdata36 #endif37 38 32 39 33 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/gl518sm.c
r667 r704 30 30 #include "compat.h" 31 31 32 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)33 32 #include <linux/init.h> 34 #else35 #define __init36 #define __initdata37 #endif38 33 39 34 #ifdef __SMP__ … … 157 152 158 153 int iterate_lock; 159 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,68)160 154 int quit_thread; 161 155 struct task_struct *thread; 162 #endif163 156 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) 164 157 wait_queue_head_t wq; … … 407 400 data->iterate = 0; 408 401 data->iterate_lock = 0; 409 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,68)410 402 data->quit_thread = 0; 411 403 data->thread = NULL; 412 #endif413 404 data->alarm_mask = 0xff; 414 405 gl518_init_client((struct i2c_client *) new_client); … … 493 484 gl518_list[i] = NULL; 494 485 495 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,68)496 486 if (data->thread) { 497 487 data->quit_thread = 1; 498 488 wake_up_interruptible(&data->wq); 499 489 } 500 #endif501 490 502 491 kfree(client); … … 652 641 } 653 642 654 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,68)655 643 int gl518_update_thread(void *c) 656 644 { … … 695 683 return 0; 696 684 } 697 #endif698 685 699 686 /* This updates vdd, vin1, vin2 values by doing slow and multiple … … 735 722 gl518_write_value(client, VIN_REG(i), max[i] << 8 | min[i]); 736 723 737 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,68)738 724 if ((data->thread) && 739 725 ((data->quit_thread) || signal_pending(current))) 740 726 goto finish; 741 #endif742 727 743 728 /* we wait now 1.5 seconds before comparing */ … … 1008 993 data->valid=0; 1009 994 1010 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,68)1011 995 if ((data->iterate != 2) && (data->thread)) { 1012 996 data->quit_thread = 1; … … 1020 1004 kernel_thread(gl518_update_thread, (void*) client, 0); 1021 1005 } 1022 #endif1023 1006 } 1024 1007 } -
lm-sensors/trunk/kernel/chips/gl520sm.c
r667 r704 30 30 #include "compat.h" 31 31 32 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)33 32 #include <linux/init.h> 34 #else35 #define __init36 #define __initdata37 #endif38 39 33 40 34 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/icspll.c
r688 r704 36 36 #include "i2c-isa.h" 37 37 #include "version.h" 38 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)39 38 #include <linux/init.h> 40 #else41 #define __init42 #define __initdata43 #endif44 39 45 40 -
lm-sensors/trunk/kernel/chips/lm75.c
r670 r704 28 28 #include "compat.h" 29 29 30 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)31 30 #include <linux/init.h> 32 #else33 #define __init34 #define __initdata35 #endif36 37 31 38 32 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/lm78.c
r667 r704 34 34 #include "compat.h" 35 35 36 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)37 36 #include <linux/init.h> 38 #else39 #define __init40 #define __initdata41 #endif42 43 37 44 38 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/lm80.c
r691 r704 35 35 #include "compat.h" 36 36 37 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)38 37 #include <linux/init.h> 39 #else40 #define __init41 #define __initdata42 #endif43 44 38 45 39 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/ltc1710.c
r667 r704 51 51 #include "compat.h" 52 52 53 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)54 53 #include <linux/init.h> 55 #else56 #define __init57 #define __initdata58 #endif59 60 54 61 55 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/matorb.c
r667 r704 32 32 #include "compat.h" 33 33 34 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)35 34 #include <linux/init.h> 36 #else37 #define __init38 #define __initdata39 #endif40 41 35 42 36 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/maxilife.c
r645 r704 54 54 #include "compat.h" 55 55 56 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)57 56 #include <linux/init.h> 58 #else59 #define __init60 #define __initdata61 #endif62 63 57 64 58 -
lm-sensors/trunk/kernel/chips/sis5595.c
r645 r704 28 28 #include <linux/sysctl.h> 29 29 #include <linux/pci.h> 30 #if LINUX_VERSION_CODE < 0x020136 /* 2.1.54 */31 #include <linux/bios32.h>32 #endif33 30 #include <asm/errno.h> 34 31 #include <asm/io.h> … … 40 37 #include "compat.h" 41 38 42 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)43 39 #include <linux/init.h> 44 #else45 #define __init46 #define __initdata47 #endif48 49 40 50 41 /* Addresses to scan. … … 275 266 int sis5595_find_sis(int *address) 276 267 { 277 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))278 268 struct pci_dev *s_bridge; 279 #else280 unsigned char SIS_bus, SIS_devfn;281 #endif282 269 u16 val; 283 270 … … 285 272 return -ENODEV; 286 273 287 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54))288 274 if (! (s_bridge = pci_find_device( 289 275 PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, NULL))) 290 276 291 #else292 if(pcibios_find_device(293 PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, 0,294 &SIS_bus, &SIS_devfn))295 #endif296 277 return -ENODEV; 297 278 -
lm-sensors/trunk/kernel/chips/thmc50.c
r667 r704 31 31 #include "compat.h" 32 32 33 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)34 33 #include <linux/init.h> 35 #else36 #define __init37 #define __initdata38 #endif39 40 34 41 35 /* Addresses to scan */ -
lm-sensors/trunk/kernel/chips/w83781d.c
r693 r704 48 48 #include "compat.h" 49 49 50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)51 50 #include <linux/init.h> 52 #else53 #define __init54 #define __initdata55 #endif56 51 57 52 /* RT Table support #defined so we can take it out if it gets bothersome */ -
lm-sensors/trunk/kernel/sensors.c
r667 r704 34 34 #include "compat.h" 35 35 36 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)37 36 #include <linux/init.h> 38 #else39 #define __init40 #endif41 37 42 38 #ifdef MODULE … … 63 59 static struct ctl_table_header *sensors_entries[SENSORS_ENTRY_MAX]; 64 60 65 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58))66 61 static struct i2c_client *sensors_clients[SENSORS_ENTRY_MAX]; 67 62 static unsigned short sensors_inodes[SENSORS_ENTRY_MAX]; … … 69 64 static void sensors_fill_inode(struct inode *inode, int fill); 70 65 static void sensors_dir_fill_inode(struct inode *inode, int fill); 71 #endif 72 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */ 66 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1) */ 73 67 74 68 static ctl_table sysctl_table[] = { … … 184 178 sensors_entries[id-256] = new_header; 185 179 186 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58))187 180 sensors_clients[id-256] = client; 188 181 #ifdef DEBUG … … 201 194 new_header->ctl_table->child->child->de->fill_inode = &sensors_dir_fill_inode; 202 195 #endif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,27)) 203 #endif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58))204 196 205 197 return id; … … 219 211 kfree(table); 220 212 sensors_entries[id] = NULL; 221 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58))222 213 sensors_clients[id] = NULL; 223 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */ 224 } 225 } 226 227 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 214 } 215 } 216 228 217 /* Monitor access for /proc/sys/dev/sensors; make unloading sensors.o 229 218 impossible if some process still uses it or some file in it */ … … 267 256 client->driver->dec_use(client); 268 257 } 269 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */270 258 271 259 int sensors_proc_chips(ctl_table *ctl, int write, struct file * filp, … … 778 766 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1)) 779 767 sensors_proc_header->ctl_table->child->de->owner = THIS_MODULE; 780 #el if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58))768 #else 781 769 sensors_proc_header->ctl_table->child->de->fill_inode = &sensors_fill_inode; 782 770 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1)) */
