1999-07-05 01:20:07 (16 years ago)

Lots of small thingies

This commit adds all relevant i2c source code patches we applied to the
lm_sensors project. They are all very small things. A list is found below.
This commit synchronises the lm_sensors i2c tree and Simon's tree.
Note that the current source tree will still not work with lm_sensors
The current tree compiles with kernels 2.0.0, 2.2.9, probably everything
in-between, and very likely with 2.3.x kernels (the only known incompatibility
is taken care of).

All known PPC patches are also applied; we should ask Geert Uytterhoeven
<geert@…> to check whether the current tree compiles on PPCs
(yes, Simon, they got it running on Macs too!)

Please examine the current tree; one of the things which needs to be done
is to rename some internal variables to correspond with the new source
file names. But I first want an OK on the new names.

* i2c-philips-par.c: Added #include <linux/stddef> (to make it compile on PPC)
* algo-bit.c: Set i2c_debug to zero by default
* i2c-core.c: Introduces init_MUTEX to make it compile with new 2.3 kernels
* i2c-elv.c: Removed RCS $log (it gets much too long)
* i2c-velleman.c: Removed RCS $log (it gets much too long)
* i2c.h: Included <asm/page.h> for 2.0 kernels
* i2c.h: Added I2C_DRIVERID_BT848
* i2c.h: Renamed #define HW_B_MB to HW_B_VIA
* i2c.h: Added HW_B_HYDRA
* i2c-algo-bit.h: Changed line 2 from AGLO_BIT_H to ALGO_BIT_H
* i2c-algo-bit.h: Corrected comment typo
* i2c-philips-par.c, i2c-elektor.c, i2c-velleman.c, i2c-elv.c:

You can now rmmod adapters even when they have registered clients.
Without this, you would have to detach the clients first. Only way of doing
this is to rmmod the client drivers, but the same drivers might be used to
access clients behind other hosts.

* All .c files: only included <linux/init.h> for kernels >= 2.1.35
* i2c-dev.c: Changed KERNEL_VERSION to a plain 0x number for old kernels
* i2c-algo-bit.c: Commented out alg_rcsid to stop compiler complaints
* i2c-elektor.c: renamed `irq' parameter to stop compiler complaints
* i2c-elektor.c: commented out pcf_isa_sleep (unused function) to stop

compiler complaints

* Makefile: Added WARN directive

1 modified


  • i2c/trunk/kernel/i2c-philips-par.c

    r3314 r3315  
    2424#include <linux/ioport.h> 
    2525#include <linux/module.h> 
     26#if LINUX_VERSION_CODE >= 0x020135 
    2627#include <linux/init.h> 
     29#define __init  
    2731#include <asm/io.h> 
     32#include <linux/stddef.h> 
    2934#include "i2c.h" 
    120125int bit_lp_reg(struct i2c_client *client) 
    122         MOD_INC_USE_COUNT; 
    123127        return 0; 
    126130int bit_lp_unreg(struct i2c_client *client) 
    128         MOD_DEC_USE_COUNT; 
    129132        return 0;