summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/i2c-id.h3
-rw-r--r--include/linux/i2c.h65
-rw-r--r--include/linux/kernel_stat.h1
-rw-r--r--include/linux/mount.h3
-rw-r--r--include/linux/parport.h7
-rw-r--r--include/linux/raid/md.h1
-rw-r--r--include/linux/sched.h36
8 files changed, 59 insertions, 63 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 821abdf30..050318926 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -238,11 +238,10 @@ struct buffer_head {
char * b_data; /* pointer to data block (512 byte) */
struct page *b_page; /* the page this bh is mapped to */
void (*b_end_io)(struct buffer_head *bh, int uptodate); /* I/O completion */
- void *b_dev_id;
+ void *b_private; /* reserved for b_end_io */
unsigned long b_rsector; /* Real buffer location on disk */
wait_queue_head_t b_wait;
- struct kiobuf * b_kiobuf; /* kiobuf which owns this IO */
};
typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
@@ -803,7 +802,7 @@ struct file_system_type var = { \
/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
#define fops_get(fops) \
(((fops) && (fops)->owner) \
- ? __MOD_INC_USE_COUNT((fops)->owner), (fops) \
+ ? ( try_inc_mod_count((fops)->owner) ? (fops) : NULL ) \
: (fops))
#define fops_put(fops) \
@@ -900,7 +899,6 @@ extern int blkdev_put(struct block_device *, int);
/* fs/devices.c */
extern const struct block_device_operations *get_blkfops(unsigned int);
-extern struct file_operations *get_chrfops(unsigned int, unsigned int);
extern int register_chrdev(unsigned int, const char *, struct file_operations *);
extern int unregister_chrdev(unsigned int, const char *);
extern int chrdev_open(struct inode *, struct file *);
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index ae788ce52..9c123fa48 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -20,7 +20,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- */
-/* $Id: i2c-id.h,v 1.15 2000/03/16 14:01:57 frodo Exp $ */
+/* $Id: i2c-id.h,v 1.16 2000/04/03 18:57:42 frodo Exp $ */
#ifndef I2C_ID_H
#define I2C_ID_H
@@ -70,6 +70,7 @@
#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */
#define I2C_DRIVERID_PCF8583 25 /* real time clock */
#define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */
+#define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */
#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
#define I2C_DRIVERID_EXP1 0xF1
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index f1f82a1c8..62066f8b0 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -23,13 +23,17 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c.h,v 1.37 2000/02/15 17:57:27 frodo Exp $ */
+/* $Id: i2c.h,v 1.40 2000/07/19 19:55:45 frodo Exp $ */
#ifndef I2C_H
#define I2C_H
#include <linux/i2c-id.h> /* id values of adapters et. al. */
+
+struct i2c_msg;
+
+
#ifdef __KERNEL__
/* --- Includes and compatibility declarations ------------------------ */
@@ -56,7 +60,6 @@
#define I2C_CLIENT_MAX 32
#define I2C_DUMMY_MAX 4
-struct i2c_msg;
struct i2c_algorithm;
struct i2c_adapter;
struct i2c_client;
@@ -86,23 +89,6 @@ extern int i2c_slave_send(struct i2c_client *,char*,int);
extern int i2c_slave_recv(struct i2c_client *,char*,int);
-/*
- * I2C Message - could be used in the current interface to
- */
-struct i2c_msg {
- u16 addr; /* slave address */
- unsigned short flags;
-#define I2C_M_TEN 0x10 /* we have a ten bit chip address */
-#define I2C_M_RD 0x01
-#define I2C_M_NOSTART 0x4000
-#define I2C_M_REV_DIR_ADDR 0x2000
-#if 0
-#define I2C_M_PROBE 0x20
-#endif
- short len; /* msg length */
- char *buf; /* pointer to msg data */
-};
-
/* This is the very generalized SMBus access routine. You probably do not
want to use this, though; one of the functions below may be much easier,
@@ -198,6 +184,8 @@ struct i2c_client {
struct i2c_adapter *adapter; /* the adapter we sit on */
struct i2c_driver *driver; /* and our access routines */
void *data; /* for the clients */
+ int usage_count; /* How many accesses currently */
+ /* to the client */
};
@@ -283,6 +271,11 @@ struct i2c_adapter {
#define I2C_DF_NOTIFY 0x01 /* notify on bus (de/a)ttaches */
#define I2C_DF_DUMMY 0x02 /* do not connect any clients */
+/*flags for the client struct: */
+#define I2C_CLIENT_ALLOW_USE 0x01 /* Client allows access */
+#define I2C_CLIENT_ALLOW_MULTIPLE_USE 0x02 /* Allow multiple access-locks */
+ /* on an i2c_client */
+
/* i2c_client_address_data is the struct for holding default client
* addresses for a driver and for the parameters supplied on the
* command line
@@ -326,6 +319,23 @@ extern int i2c_detach_client(struct i2c_client *);
extern void i2c_inc_use_client(struct i2c_client *);
extern void i2c_dec_use_client(struct i2c_client *);
+/* New function: This is to get an i2c_client-struct for controlling the
+ client either by using i2c_control-function or having the
+ client-module export functions that can be used with the i2c_client
+ -struct. */
+extern struct i2c_client *i2c_get_client(int driver_id, int adapter_id,
+ struct i2c_client *prev);
+
+/* Should be used with new function
+ extern struct i2c_client *i2c_get_client(int,int,struct i2c_client *);
+ to make sure that client-struct is valid and that it is okay to access
+ the i2c-client.
+ returns -EACCES if client doesn't allow use (default)
+ returns -EBUSY if client doesn't allow multiple use (default) and
+ usage_count >0 */
+extern int i2c_use_client(struct i2c_client *);
+extern int i2c_release_client(struct i2c_client *);
+
/* returns -EBUSY if address has been taken, 0 if not. Note that the only
other place at which this is called is within i2c_attach_client; so
you can cheat by simply not registering. Not recommended, of course! */
@@ -361,6 +371,21 @@ extern int i2c_check_functionality (struct i2c_adapter *adap, u32 func);
#endif /* __KERNEL__ */
+#include <linux/types.h>
+/*
+ * I2C Message - used for pure i2c transaction, also from /dev interface
+ */
+struct i2c_msg {
+ __u16 addr; /* slave address */
+ unsigned short flags;
+#define I2C_M_TEN 0x10 /* we have a ten bit chip address */
+#define I2C_M_RD 0x01
+#define I2C_M_NOSTART 0x4000
+#define I2C_M_REV_DIR_ADDR 0x2000
+ short len; /* msg length */
+ char *buf; /* pointer to msg data */
+};
+
/* To determine what functionality is present */
#define I2C_FUNC_I2C 0x00000001
@@ -395,7 +420,7 @@ extern int i2c_check_functionality (struct i2c_adapter *adap, u32 func);
I2C_FUNC_SMBUS_BYTE_DATA | \
I2C_FUNC_SMBUS_WORD_DATA | \
I2C_FUNC_SMBUS_PROC_CALL | \
- I2C_FUNC_SMBUS_READ_BLOCK_DATA
+ I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
/*
* Data for SMBus Messages
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index c9f194be4..179963c77 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -16,7 +16,6 @@
#define DK_MAX_DISK 16
struct kernel_stat {
- unsigned int cpu_user, cpu_nice, cpu_system;
unsigned int per_cpu_user[NR_CPUS],
per_cpu_nice[NR_CPUS],
per_cpu_system[NR_CPUS];
diff --git a/include/linux/mount.h b/include/linux/mount.h
index adb571de2..8eff1ecc9 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -12,6 +12,8 @@
#define _LINUX_MOUNT_H
#ifdef __KERNEL__
+#define MNT_VISIBLE 1
+
struct vfsmount
{
struct dentry *mnt_mountpoint; /* dentry of mountpoint */
@@ -24,6 +26,7 @@ struct vfsmount
struct list_head mnt_mounts; /* list of children, anchored here */
struct list_head mnt_child; /* and going through their mnt_child */
atomic_t mnt_count;
+ int mnt_flags;
char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
struct list_head mnt_list;
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 27d813e9d..71fc1398b 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -1,10 +1,9 @@
/* $Id: parport.h,v 1.1 1998/05/17 10:57:52 andrea Exp andrea $ */
/*
- * The block comments above the functions in this file are
- * licensed as part of the generated file
- * Documentation/DocBook/parportbook.sgml under the GNU Free
- * Documentation License.
+ * Any part of this program may be used in documents licensed under
+ * the GNU Free Documentation License, Version 1.1 or any later version
+ * published by the Free Software Foundation.
*/
#ifndef _PARPORT_H_
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index 7aef27bca..6cc9767a3 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -82,6 +82,7 @@ extern struct gendisk * find_gendisk (kdev_t dev);
extern int md_notify_reboot(struct notifier_block *this,
unsigned long code, void *x);
extern int md_error (kdev_t mddev, kdev_t rdev);
+extern void md_run_setup(void);
extern void md_print_devices (void);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2d7161676..6b82d6977 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -139,8 +139,9 @@ extern void init_idle(void);
extern void show_state(void);
extern void cpu_init (void);
extern void trap_init(void);
-extern void update_one_process( struct task_struct *p,
- unsigned long ticks, unsigned long user, unsigned long system, int cpu);
+extern void update_process_times(int user);
+extern void update_one_process(struct task_struct *p, unsigned long user,
+ unsigned long system, int cpu);
#define MAX_SCHEDULE_TIMEOUT LONG_MAX
extern signed long FASTCALL(schedule_timeout(signed long timeout));
@@ -683,37 +684,6 @@ extern fd_set *alloc_fdset(int);
extern int expand_fdset(struct files_struct *, int nr);
extern void free_fdset(fd_set *, int);
-/* Expand files. Return <0 on error; 0 nothing done; 1 files expanded,
- * we may have blocked.
- *
- * Should be called with the files->file_lock spinlock held for write.
- */
-static inline int expand_files(struct files_struct *files, int nr)
-{
- int err, expand = 0;
-#ifdef FDSET_DEBUG
- printk (KERN_ERR __FUNCTION__ " %d: nr = %d\n", current->pid, nr);
-#endif
-
- if (nr >= files->max_fdset) {
- expand = 1;
- if ((err = expand_fdset(files, nr)))
- goto out;
- }
- if (nr >= files->max_fds) {
- expand = 1;
- if ((err = expand_fd_array(files, nr)))
- goto out;
- }
- err = expand;
- out:
-#ifdef FDSET_DEBUG
- if (err)
- printk (KERN_ERR __FUNCTION__ " %d: return %d\n", current->pid, err);
-#endif
- return err;
-}
-
extern int copy_thread(int, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
extern void flush_thread(void);
extern void exit_thread(void);