summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:23:54 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:23:54 -0800
commitad8dcf57e93e8e5f9b815e786da35ef03fc70f89 (patch)
treef3394afd32c183a41ccbc649859ad505c5e8c09c /include/linux
parent4c7ed1860c0d21292284fb044c465ba00ce89b7f (diff)
v2.4.12 -> v2.4.12.1
- Trond Myklebust: deadlock checking in lockd server - Tim Waugh: fix up parport wrong #define - Christoph Hellwig: i2c update, ext2 cleanup - Al Viro: fix partition handling sanity check. - Trond Myklebust: make NFS use SLAB_NOFS, and not play games with PF_MEMALLOC - Ben Fennema: UDF update - Alan Cox: continued merging - Chris Mason: get /proc buffer memory sizes right after buf-in-page-cache
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/b1lli.h6
-rw-r--r--include/linux/b1pcmcia.h6
-rw-r--r--include/linux/blkdev.h23
-rw-r--r--include/linux/console_struct.h2
-rw-r--r--include/linux/ext2_fs.h43
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/i2c-dev.h2
-rw-r--r--include/linux/i2c-elektor.h14
-rw-r--r--include/linux/i2c-id.h46
-rw-r--r--include/linux/i2c-proc.h396
-rw-r--r--include/linux/i2c.h23
-rw-r--r--include/linux/i2o-dev.h330
-rw-r--r--include/linux/i2o.h133
-rw-r--r--include/linux/pci_ids.h10
-rw-r--r--include/linux/sonypi.h9
-rw-r--r--include/linux/spinlock.h4
-rw-r--r--include/linux/udf_fs.h4
-rw-r--r--include/linux/udf_fs_sb.h6
-rw-r--r--include/linux/videodev.h12
19 files changed, 776 insertions, 294 deletions
diff --git a/include/linux/b1lli.h b/include/linux/b1lli.h
index cf40d7e6b7a1..24ec4670a033 100644
--- a/include/linux/b1lli.h
+++ b/include/linux/b1lli.h
@@ -1,10 +1,12 @@
-/*
- * $Id: b1lli.h,v 1.8.8.2 2001/05/17 20:41:52 kai Exp $
+/* $Id: b1lli.h,v 1.8.8.3 2001/09/23 22:25:05 kai Exp $
*
* ISDN lowlevel-module for AVM B1-card.
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
*/
#ifndef _B1LLI_H_
diff --git a/include/linux/b1pcmcia.h b/include/linux/b1pcmcia.h
index b73e4ddbeaa0..12a867c6061e 100644
--- a/include/linux/b1pcmcia.h
+++ b/include/linux/b1pcmcia.h
@@ -1,11 +1,13 @@
-/*
- * $Id: b1pcmcia.h,v 1.1.8.1 2001/05/17 20:41:52 kai Exp $
+/* $Id: b1pcmcia.h,v 1.1.8.2 2001/09/23 22:25:05 kai Exp $
*
* Exported functions of module b1pcmcia to be called by
* avm_cs card services module.
*
* Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
*/
#ifndef _B1PCMCIA_H_
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 86ea92ae5a94..7168cbdf37f6 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -203,4 +203,27 @@ static inline int get_hardsect_size(kdev_t dev)
#define blk_finished_io(nsects) do { } while (0)
#define blk_started_io(nsects) do { } while (0)
+static inline unsigned int blksize_bits(unsigned int size)
+{
+ unsigned int bits = 8;
+ do {
+ bits++;
+ size >>= 1;
+ } while (size > 256);
+ return bits;
+}
+
+static inline unsigned int block_size(kdev_t dev)
+{
+ int retval = BLOCK_SIZE;
+ int major = MAJOR(dev);
+
+ if (blksize_size[major]) {
+ int minor = MINOR(dev);
+ if (blksize_size[major][minor])
+ retval = blksize_size[major][minor];
+ }
+ return retval;
+}
+
#endif
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index 4dc4750ac2eb..bbf34f3aa21f 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -68,7 +68,7 @@ struct vc_data {
unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */
unsigned char vc_utf_count;
int vc_utf_char;
- unsigned int vc_tab_stop[5]; /* Tab stops. 160 columns. */
+ unsigned int vc_tab_stop[8]; /* Tab stops. 256 columns. */
unsigned char vc_palette[16*3]; /* Colour palette for VGA+ */
unsigned short * vc_translate;
unsigned char vc_G0_charset;
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 79d82d2ac6d8..03112a82fadb 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -558,14 +558,15 @@ extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
unsigned int block_group,
struct buffer_head ** bh);
-/* bitmap.c */
-extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
-
/* dir.c */
-
-/* file.c */
-extern int ext2_read (struct inode *, struct file *, char *, int);
-extern int ext2_write (struct inode *, struct file *, char *, int);
+extern int ext2_add_link (struct dentry *, struct inode *);
+extern ino_t ext2_inode_by_name(struct inode *, struct dentry *);
+extern int ext2_make_empty(struct inode *, struct inode *);
+extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct dentry *, struct page **);
+extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *);
+extern int ext2_empty_dir (struct inode *);
+extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **);
+extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *);
/* fsync.c */
extern int ext2_sync_file (struct file *, struct dentry *, int);
@@ -576,26 +577,21 @@ extern struct inode * ext2_new_inode (const struct inode *, int);
extern void ext2_free_inode (struct inode *);
extern unsigned long ext2_count_free_inodes (struct super_block *);
extern void ext2_check_inodes_bitmap (struct super_block *);
+extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
/* inode.c */
-
-extern struct buffer_head * ext2_getblk (struct inode *, long, int, int *);
-extern struct buffer_head * ext2_bread (struct inode *, int, int, int *);
-
extern void ext2_read_inode (struct inode *);
extern void ext2_write_inode (struct inode *, int);
extern void ext2_put_inode (struct inode *);
extern void ext2_delete_inode (struct inode *);
extern int ext2_sync_inode (struct inode *);
extern void ext2_discard_prealloc (struct inode *);
+extern void ext2_truncate (struct inode *);
/* ioctl.c */
extern int ext2_ioctl (struct inode *, struct file *, unsigned int,
unsigned long);
-/* namei.c */
-extern struct inode_operations ext2_dir_inode_operations;
-
/* super.c */
extern void ext2_error (struct super_block *, const char *, const char *, ...)
__attribute__ ((format (printf, 3, 4)));
@@ -611,33 +607,26 @@ extern int ext2_remount (struct super_block *, int *, char *);
extern struct super_block * ext2_read_super (struct super_block *,void *,int);
extern int ext2_statfs (struct super_block *, struct statfs *);
-/* truncate.c */
-extern void ext2_truncate (struct inode *);
-
/*
* Inodes and files operations
*/
/* dir.c */
extern struct file_operations ext2_dir_operations;
-extern int ext2_add_link (struct dentry *, struct inode *);
-extern ino_t ext2_inode_by_name(struct inode *, struct dentry *);
-extern int ext2_make_empty(struct inode *, struct inode *);
-extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct dentry *, struct page **);
-extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *);
-extern int ext2_empty_dir (struct inode *);
-extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **);
-extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *);
/* file.c */
extern struct inode_operations ext2_file_inode_operations;
extern struct file_operations ext2_file_operations;
+/* inode.c */
+extern struct address_space_operations ext2_aops;
+
+/* namei.c */
+extern struct inode_operations ext2_dir_inode_operations;
+
/* symlink.c */
extern struct inode_operations ext2_fast_symlink_inode_operations;
-extern struct address_space_operations ext2_aops;
-
#endif /* __KERNEL__ */
#endif /* _LINUX_EXT2_FS_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d1327ef61f97..73c5e08eac09 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -604,6 +604,7 @@ extern struct file_lock *posix_test_lock(struct file *, struct file_lock *);
extern int posix_lock_file(struct file *, struct file_lock *, unsigned int);
extern void posix_block_lock(struct file_lock *, struct file_lock *);
extern void posix_unblock_lock(struct file_lock *);
+extern int posix_locks_deadlock(struct file_lock *, struct file_lock *);
extern int __get_lease(struct inode *inode, unsigned int flags);
extern time_t lease_get_mtime(struct inode *);
extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
index 9c2d23ecb602..7134c8b8a18e 100644
--- a/include/linux/i2c-dev.h
+++ b/include/linux/i2c-dev.h
@@ -19,7 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: i2c-dev.h,v 1.8 2000/08/12 16:37:15 mds Exp $ */
+/* $Id: i2c-dev.h,v 1.9 2001/08/15 03:04:58 mds Exp $ */
#ifndef I2C_DEV_H
#define I2C_DEV_H
diff --git a/include/linux/i2c-elektor.h b/include/linux/i2c-elektor.h
index f2d8155b28e9..7c9213175892 100644
--- a/include/linux/i2c-elektor.h
+++ b/include/linux/i2c-elektor.h
@@ -22,22 +22,26 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c-elektor.h,v 1.4 2000/01/18 23:54:07 frodo Exp $ */
+/* $Id: i2c-elektor.h,v 1.5 2001/06/05 01:46:33 mds Exp $ */
#ifndef I2C_PCF_ELEKTOR_H
#define I2C_PCF_ELEKTOR_H 1
/*
- * This struct contains the hw-dependent functions of PCF8584 adapters to
- * manipulate the registers, and to init any hw-specific features.
- */
+ * This struct contains the hw-dependent functions of PCF8584 adapters to
+ * manipulate the registers, and to init any hw-specific features.
+ * vdovikin: removed: this module in real supports only one device,
+ * due to missing arguments in some functions, called from the algo-pcf module.
+ * Sometimes it's need to be rewriten -
+ * but for now just remove this for simpler reading */
+/*
struct i2c_pcf_isa {
int pi_base;
int pi_irq;
int pi_clock;
int pi_own;
};
-
+*/
#endif /* PCF_ELEKTOR_H */
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index b0f62dd14386..74f4f23c1b09 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.25 2000/10/12 07:27:29 simon Exp $ */
+/* $Id: i2c-id.h,v 1.35 2001/08/12 17:22:20 mds Exp $ */
#ifndef I2C_ID_H
#define I2C_ID_H
@@ -65,7 +65,7 @@
#define I2C_DRIVERID_BT829 19 /* pc to tv encoder */
#define I2C_DRIVERID_TDA9850 20 /* audio mixer */
#define I2C_DRIVERID_TDA9855 21 /* audio mixer */
-#define I2C_DRIVERID_SAA7110 22 /* */
+#define I2C_DRIVERID_SAA7110 22 /* video decoder */
#define I2C_DRIVERID_MGATVO 23 /* Matrox TVOut */
#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */
#define I2C_DRIVERID_PCF8583 25 /* real time clock */
@@ -84,7 +84,12 @@
#define I2C_DRIVERID_VES1820 37 /* VLSI DVB-C decoder */
#define I2C_DRIVERID_SAA7113 38 /* video decoder */
#define I2C_DRIVERID_TDA8444 39 /* octuple 6-bit DAC */
-
+#define I2C_DRIVERID_BT819 40 /* video decoder */
+#define I2C_DRIVERID_BT856 41 /* video encoder */
+#define I2C_DRIVERID_VPX32XX 42 /* video decoder+vbi/vtxt */
+#define I2C_DRIVERID_DRP3510 43 /* ADR decoder (Astra Radio) */
+#define I2C_DRIVERID_SP5055 44 /* Satellite tuner */
+#define I2C_DRIVERID_STV0030 45 /* Multipurpose switch */
#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
#define I2C_DRIVERID_EXP1 0xF1
@@ -94,6 +99,35 @@
#define I2C_DRIVERID_I2CDEV 900
#define I2C_DRIVERID_I2CPROC 901
+/* IDs -- Use DRIVERIDs 1000-1999 for sensors.
+ These were originally in sensors.h in the lm_sensors package */
+#define I2C_DRIVERID_LM78 1002
+#define I2C_DRIVERID_LM75 1003
+#define I2C_DRIVERID_GL518 1004
+#define I2C_DRIVERID_EEPROM 1005
+#define I2C_DRIVERID_W83781D 1006
+#define I2C_DRIVERID_LM80 1007
+#define I2C_DRIVERID_ADM1021 1008
+#define I2C_DRIVERID_ADM9240 1009
+#define I2C_DRIVERID_LTC1710 1010
+#define I2C_DRIVERID_SIS5595 1011
+#define I2C_DRIVERID_ICSPLL 1012
+#define I2C_DRIVERID_BT869 1013
+#define I2C_DRIVERID_MAXILIFE 1014
+#define I2C_DRIVERID_MATORB 1015
+#define I2C_DRIVERID_GL520 1016
+#define I2C_DRIVERID_THMC50 1017
+#define I2C_DRIVERID_DDCMON 1018
+#define I2C_DRIVERID_VIA686A 1019
+#define I2C_DRIVERID_ADM1025 1020
+#define I2C_DRIVERID_LM87 1021
+#define I2C_DRIVERID_PCF8574 1022
+#define I2C_DRIVERID_MTP008 1023
+#define I2C_DRIVERID_DS1621 1024
+#define I2C_DRIVERID_ADM1024 1025
+#define I2C_DRIVERID_IT87 1026
+#define I2C_DRIVERID_CH700X 1027 /* single driver for CH7003-7009 digital pc to tv encoders */
+
/*
* ---- Adapter types ----------------------------------------------------
*
@@ -109,7 +143,6 @@
#define I2C_ALGO_ISA 0x050000 /* lm_sensors ISA pseudo-adapter */
#define I2C_ALGO_SAA7146 0x060000 /* SAA 7146 video decoder bus */
#define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */
-#define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */
#define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */
@@ -140,8 +173,10 @@
#define I2C_HW_B_G400 0x09 /* Matrox G400 */
#define I2C_HW_B_I810 0x0a /* Intel I810 */
#define I2C_HW_B_VOO 0x0b /* 3dfx Voodoo 3 / Banshee */
+#define I2C_HW_B_PPORT 0x0c /* Primitive parallel port adapter */
#define I2C_HW_B_RIVA 0x10 /* Riva based graphics cards */
#define I2C_HW_B_IOC 0x11 /* IOC bit-wiggling */
+#define I2C_HW_B_TSUNA 0x12 /* DEC Tsunami chipset */
/* --- PCF 8584 based algorithms */
#define I2C_HW_P_LP 0x00 /* Parallel port interface */
@@ -154,9 +189,6 @@
/* --- MPC8xx PowerPC adapters */
#define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */
-/* --- ITE based algorithms */
-#define I2C_HW_I_IIC 0x00 /* controller on the ITE */
-
/* --- SMBus only adapters */
#define I2C_HW_SMBUS_PIIX4 0x00
#define I2C_HW_SMBUS_ALI15X3 0x01
diff --git a/include/linux/i2c-proc.h b/include/linux/i2c-proc.h
new file mode 100644
index 000000000000..364cfe77d4d6
--- /dev/null
+++ b/include/linux/i2c-proc.h
@@ -0,0 +1,396 @@
+/*
+ sensors.h - Part of lm_sensors, Linux kernel modules for hardware
+ monitoring
+ Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef SENSORS_SENSORS_H
+#define SENSORS_SENSORS_H
+
+#ifdef __KERNEL__
+
+/* Next two must be included before sysctl.h can be included, in 2.0 kernels */
+#include <linux/types.h>
+#include <linux/fs.h>
+#include <linux/sysctl.h>
+
+/* The type of callback functions used in sensors_{proc,sysctl}_real */
+typedef void (*i2c_real_callback) (struct i2c_client * client,
+ int operation, int ctl_name,
+ int *nrels_mag, long *results);
+
+/* Values for the operation field in the above function type */
+#define SENSORS_PROC_REAL_INFO 1
+#define SENSORS_PROC_REAL_READ 2
+#define SENSORS_PROC_REAL_WRITE 3
+
+/* These funcion reads or writes a 'real' value (encoded by the combination
+ of an integer and a magnitude, the last is the power of ten the value
+ should be divided with) to a /proc/sys directory. To use these functions,
+ you must (before registering the ctl_table) set the extra2 field to the
+ client, and the extra1 field to a function of the form:
+ void func(struct i2c_client *client, int operation, int ctl_name,
+ int *nrels_mag, long *results)
+ This last function can be called for three values of operation. If
+ operation equals SENSORS_PROC_REAL_INFO, the magnitude should be returned
+ in nrels_mag. If operation equals SENSORS_PROC_REAL_READ, values should
+ be read into results. nrels_mag should return the number of elements
+ read; the maximum number is put in it on entry. Finally, if operation
+ equals SENSORS_PROC_REAL_WRITE, the values in results should be
+ written to the chip. nrels_mag contains on entry the number of elements
+ found.
+ In all cases, client points to the client we wish to interact with,
+ and ctl_name is the SYSCTL id of the file we are accessing. */
+extern int i2c_sysctl_real(ctl_table * table, int *name, int nlen,
+ void *oldval, size_t * oldlenp,
+ void *newval, size_t newlen,
+ void **context);
+extern int i2c_proc_real(ctl_table * ctl, int write, struct file *filp,
+ void *buffer, size_t * lenp);
+
+
+
+/* These rather complex functions must be called when you want to add or
+ delete an entry in /proc/sys/dev/sensors/chips (not yet implemented). It
+ also creates a new directory within /proc/sys/dev/sensors/.
+ ctl_template should be a template of the newly created directory. It is
+ copied in memory. The extra2 field of each file is set to point to client.
+ If any driver wants subdirectories within the newly created directory,
+ these functions must be updated! */
+extern int i2c_register_entry(struct i2c_client *client,
+ const char *prefix,
+ ctl_table * ctl_template,
+ struct module *controlling_mod);
+
+extern void i2c_deregister_entry(int id);
+
+
+/* A structure containing detect information.
+ Force variables overrule all other variables; they force a detection on
+ that place. If a specific chip is given, the module blindly assumes this
+ chip type is present; if a general force (kind == 0) is given, the module
+ will still try to figure out what type of chip is present. This is useful
+ if for some reasons the detect for SMBus or ISA address space filled
+ fails.
+ probe: insmod parameter. Initialize this list with SENSORS_I2C_END values.
+ A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second is the address.
+ kind: The kind of chip. 0 equals any chip.
+*/
+struct i2c_force_data {
+ unsigned short *force;
+ unsigned short kind;
+};
+
+/* A structure containing the detect information.
+ normal_i2c: filled in by the module writer. Terminated by SENSORS_I2C_END.
+ A list of I2C addresses which should normally be examined.
+ normal_i2c_range: filled in by the module writer. Terminated by
+ SENSORS_I2C_END
+ A list of pairs of I2C addresses, each pair being an inclusive range of
+ addresses which should normally be examined.
+ normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END.
+ A list of ISA addresses which should normally be examined.
+ normal_isa_range: filled in by the module writer. Terminated by
+ SENSORS_ISA_END
+ A list of triples. The first two elements are ISA addresses, being an
+ range of addresses which should normally be examined. The third is the
+ modulo parameter: only addresses which are 0 module this value relative
+ to the first address of the range are actually considered.
+ probe: insmod parameter. Initialize this list with SENSORS_I2C_END values.
+ A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second is the address. These
+ addresses are also probed, as if they were in the 'normal' list.
+ probe_range: insmod parameter. Initialize this list with SENSORS_I2C_END
+ values.
+ A list of triples. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second and third are addresses.
+ These form an inclusive range of addresses that are also probed, as
+ if they were in the 'normal' list.
+ ignore: insmod parameter. Initialize this list with SENSORS_I2C_END values.
+ A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second is the I2C address. These
+ addresses are never probed. This parameter overrules 'normal' and
+ 'probe', but not the 'force' lists.
+ ignore_range: insmod parameter. Initialize this list with SENSORS_I2C_END
+ values.
+ A list of triples. The first value is a bus number (SENSORS_ISA_BUS for
+ the ISA bus, -1 for any I2C bus), the second and third are addresses.
+ These form an inclusive range of I2C addresses that are never probed.
+ This parameter overrules 'normal' and 'probe', but not the 'force' lists.
+ force_data: insmod parameters. A list, ending with an element of which
+ the force field is NULL.
+*/
+struct i2c_address_data {
+ unsigned short *normal_i2c;
+ unsigned short *normal_i2c_range;
+ unsigned int *normal_isa;
+ unsigned int *normal_isa_range;
+ unsigned short *probe;
+ unsigned short *probe_range;
+ unsigned short *ignore;
+ unsigned short *ignore_range;
+ struct i2c_force_data *forces;
+};
+
+/* Internal numbers to terminate lists */
+#define SENSORS_I2C_END 0xfffe
+#define SENSORS_ISA_END 0xfffefffe
+
+/* The numbers to use to set an ISA or I2C bus address */
+#define SENSORS_ISA_BUS 9191
+#define SENSORS_ANY_I2C_BUS 0xffff
+
+/* The length of the option lists */
+#define SENSORS_MAX_OPTS 48
+
+/* Default fill of many variables */
+#define SENSORS_DEFAULTS {SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END, \
+ SENSORS_I2C_END, SENSORS_I2C_END, SENSORS_I2C_END}
+
+/* This is ugly. We need to evaluate SENSORS_MAX_OPTS before it is
+ stringified */
+#define SENSORS_MODPARM_AUX1(x) "1-" #x "h"
+#define SENSORS_MODPARM_AUX(x) SENSORS_MODPARM_AUX1(x)
+#define SENSORS_MODPARM SENSORS_MODPARM_AUX(SENSORS_MAX_OPTS)
+
+/* SENSORS_MODULE_PARM creates a module parameter, and puts it in the
+ module header */
+#define SENSORS_MODULE_PARM(var,desc) \
+ static unsigned short var[SENSORS_MAX_OPTS] = SENSORS_DEFAULTS; \
+ MODULE_PARM(var,SENSORS_MODPARM); \
+ MODULE_PARM_DESC(var,desc)
+
+/* SENSORS_MODULE_PARM creates a 'force_*' module parameter, and puts it in
+ the module header */
+#define SENSORS_MODULE_PARM_FORCE(name) \
+ SENSORS_MODULE_PARM(force_ ## name, \
+ "List of adapter,address pairs which are unquestionably" \
+ " assumed to contain a `" # name "' chip")
+
+
+/* This defines several insmod variables, and the addr_data structure */
+#define SENSORS_INSMOD \
+ SENSORS_MODULE_PARM(probe, \
+ "List of adapter,address pairs to scan additionally"); \
+ SENSORS_MODULE_PARM(probe_range, \
+ "List of adapter,start-addr,end-addr triples to scan " \
+ "additionally"); \
+ SENSORS_MODULE_PARM(ignore, \
+ "List of adapter,address pairs not to scan"); \
+ SENSORS_MODULE_PARM(ignore_range, \
+ "List of adapter,start-addr,end-addr triples not to " \
+ "scan"); \
+ static struct i2c_address_data addr_data = \
+ {normal_i2c, normal_i2c_range, \
+ normal_isa, normal_isa_range, \
+ probe, probe_range, \
+ ignore, ignore_range, \
+ forces}
+
+/* The following functions create an enum with the chip names as elements.
+ The first element of the enum is any_chip. These are the only macros
+ a module will want to use. */
+
+#define SENSORS_INSMOD_0 \
+ enum chips { any_chip }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ static struct i2c_force_data forces[] = {{force,any_chip},{NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_1(chip1) \
+ enum chips { any_chip, chip1 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ static struct i2c_force_data forces[] = {{force,any_chip},\
+ {force_ ## chip1,chip1}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_2(chip1,chip2) \
+ enum chips { any_chip, chip1, chip2 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_3(chip1,chip2,chip3) \
+ enum chips { any_chip, chip1, chip2, chip3 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_4(chip1,chip2,chip3,chip4) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_5(chip1,chip2,chip3,chip4,chip5) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ SENSORS_MODULE_PARM_FORCE(chip5); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {force_ ## chip5,chip5}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_6(chip1,chip2,chip3,chip4,chip5,chip6) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ SENSORS_MODULE_PARM_FORCE(chip5); \
+ SENSORS_MODULE_PARM_FORCE(chip6); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {force_ ## chip5,chip5}, \
+ {force_ ## chip6,chip6}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+#define SENSORS_INSMOD_7(chip1,chip2,chip3,chip4,chip5,chip6,chip7) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, chip7 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ SENSORS_MODULE_PARM_FORCE(chip5); \
+ SENSORS_MODULE_PARM_FORCE(chip6); \
+ SENSORS_MODULE_PARM_FORCE(chip7); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {force_ ## chip5,chip5}, \
+ {force_ ## chip6,chip6}, \
+ {force_ ## chip7,chip7}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
+typedef int i2c_found_addr_proc(struct i2c_adapter *adapter,
+ int addr, unsigned short flags,
+ int kind);
+
+/* Detect function. It iterates over all possible addresses itself. For
+ SMBus addresses, it will only call found_proc if some client is connected
+ to the SMBus (unless a 'force' matched); for ISA detections, this is not
+ done. */
+extern int i2c_detect(struct i2c_adapter *adapter,
+ struct i2c_address_data *address_data,
+ i2c_found_addr_proc * found_proc);
+
+
+/* This macro is used to scale user-input to sensible values in almost all
+ chip drivers. */
+extern inline int SENSORS_LIMIT(long value, long low, long high)
+{
+ if (value < low)
+ return low;
+ else if (value > high)
+ return high;
+ else
+ return value;
+}
+
+#endif /* def __KERNEL__ */
+
+
+/* The maximum length of the prefix */
+#define SENSORS_PREFIX_MAX 20
+
+/* Sysctl IDs */
+#ifdef DEV_HWMON
+#define DEV_SENSORS DEV_HWMON
+#else /* ndef DEV_HWMOM */
+#define DEV_SENSORS 2 /* The id of the lm_sensors directory within the
+ dev table */
+#endif /* def DEV_HWMON */
+
+#define SENSORS_CHIPS 1
+struct i2c_chips_data {
+ int sysctl_id;
+ char name[SENSORS_PREFIX_MAX + 13];
+};
+
+#endif /* def SENSORS_SENSORS_H */
+
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 546c573a45d3..256a7da0d845 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -23,11 +23,14 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c.h,v 1.42 2000/09/06 20:14:06 frodo Exp $ */
+/* $Id: i2c.h,v 1.46 2001/08/31 00:04:07 phil Exp $ */
#ifndef I2C_H
#define I2C_H
+#define I2C_DATE "20010830"
+#define I2C_VERSION "2.6.1"
+
#include <linux/i2c-id.h> /* id values of adapters et. al. */
#include <linux/types.h>
@@ -202,7 +205,7 @@ struct i2c_algorithm {
char name[32]; /* textual description */
unsigned int id;
- /* If a adapter algorithm can't to I2C-level access, set master_xfer
+ /* If an adapter algorithm can't to I2C-level access, set master_xfer
to NULL. If an adapter algorithm can do SMBus access, set
smbus_xfer. If set to NULL, the SMBus protocol is simulated
using common I2C messages */
@@ -344,7 +347,7 @@ extern int i2c_release_client(struct i2c_client *);
you can cheat by simply not registering. Not recommended, of course! */
extern int i2c_check_addr (struct i2c_adapter *adapter, int addr);
-/* Detect function. It itterates over all possible addresses itself.
+/* Detect function. It iterates over all possible addresses itself.
* It will only call found_proc if some client is connected at the
* specific address (unless a 'force' matched);
*/
@@ -360,7 +363,7 @@ extern int i2c_probe(struct i2c_adapter *adapter,
extern int i2c_control(struct i2c_client *,unsigned int, unsigned long);
/* This call returns a unique low identifier for each registered adapter,
- * or -1 if the adapter was not regisitered.
+ * or -1 if the adapter was not registered.
*/
extern int i2c_adapter_id(struct i2c_adapter *adap);
@@ -454,8 +457,9 @@ union i2c_smbus_data {
* corresponding header files.
*/
/* -> bit-adapter specific ioctls */
-#define I2C_RETRIES 0x0701 /* number times a device address should */
- /* be polled when not acknowledging */
+#define I2C_RETRIES 0x0701 /* number of times a device address */
+ /* should be polled when not */
+ /* acknowledging */
#define I2C_TIMEOUT 0x0702 /* set timeout - call with int */
@@ -549,5 +553,12 @@ union i2c_smbus_data {
ignore, ignore_range, \
force}
+/* Detect whether we are on the isa bus. If this returns true, all i2c
+ access will fail! */
+#define i2c_is_isa_client(clientptr) \
+ ((clientptr)->adapter->algo->id == I2C_ALGO_ISA)
+#define i2c_is_isa_adapter(adapptr) \
+ ((adapptr)->algo->id == I2C_ALGO_ISA)
+
#endif /* def __KERNEL__ */
#endif /* I2C_H */
diff --git a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h
index 5ac8d9cef46e..cd4eb5ac5a9b 100644
--- a/include/linux/i2o-dev.h
+++ b/include/linux/i2o-dev.h
@@ -34,11 +34,11 @@
#define I2OLCTGET _IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct)
#define I2OPARMSET _IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget)
#define I2OPARMGET _IOWR(I2O_MAGIC_NUMBER,4,struct i2o_cmd_psetget)
-#define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer)
-#define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer)
+#define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer)
+#define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer)
#define I2OSWDEL _IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer)
#define I2OVALIDATE _IOR(I2O_MAGIC_NUMBER,8,u32)
-#define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html)
+#define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html)
#define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id)
#define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info)
@@ -68,7 +68,7 @@ struct i2o_sw_xfer
void *buf; /* Pointer to software buffer */
unsigned int *swlen; /* Length of software data */
unsigned int *maxfrag; /* Maximum fragment count */
- unsigned int *curfrag; /* Current fragment count */
+ unsigned int *curfrag; /* Current fragment count */
};
struct i2o_html
@@ -98,7 +98,7 @@ struct i2o_evt_info
{
struct i2o_evt_id id;
unsigned char evt_data[I2O_EVT_DATA_SIZE];
- unsigned int data_size;
+ unsigned int data_size;
};
struct i2o_evt_get
@@ -119,8 +119,8 @@ struct i2o_evt_get
#define I2O_BUS_PCI 4
#define I2O_BUS_PCMCIA 5
#define I2O_BUS_NUBUS 6
-#define I2O_BUS_CARDBUS 7
-#define I2O_BUS_UNKNOWN 0x80
+#define I2O_BUS_CARDBUS 7
+#define I2O_BUS_UNKNOWN 0x80
#ifndef __KERNEL__
@@ -130,127 +130,139 @@ typedef unsigned int u32;
#endif /* __KERNEL__ */
-typedef struct _i2o_pci_bus {
- u8 PciFunctionNumber;
- u8 PciDeviceNumber;
- u8 PciBusNumber;
- u8 reserved;
- u16 PciVendorID;
- u16 PciDeviceID;
+typedef struct _i2o_pci_bus
+{
+ u8 PciFunctionNumber;
+ u8 PciDeviceNumber;
+ u8 PciBusNumber;
+ u8 reserved;
+ u16 PciVendorID;
+ u16 PciDeviceID;
} i2o_pci_bus;
-typedef struct _i2o_local_bus {
- u16 LbBaseIOPort;
- u16 reserved;
- u32 LbBaseMemoryAddress;
+typedef struct _i2o_local_bus
+{
+ u16 LbBaseIOPort;
+ u16 reserved;
+ u32 LbBaseMemoryAddress;
} i2o_local_bus;
-typedef struct _i2o_isa_bus {
- u16 IsaBaseIOPort;
- u8 CSN;
- u8 reserved;
- u32 IsaBaseMemoryAddress;
+typedef struct _i2o_isa_bus
+{
+ u16 IsaBaseIOPort;
+ u8 CSN;
+ u8 reserved;
+ u32 IsaBaseMemoryAddress;
} i2o_isa_bus;
-typedef struct _i2o_eisa_bus_info {
- u16 EisaBaseIOPort;
- u8 reserved;
- u8 EisaSlotNumber;
- u32 EisaBaseMemoryAddress;
+typedef struct _i2o_eisa_bus_info
+{
+ u16 EisaBaseIOPort;
+ u8 reserved;
+ u8 EisaSlotNumber;
+ u32 EisaBaseMemoryAddress;
} i2o_eisa_bus;
-typedef struct _i2o_mca_bus {
- u16 McaBaseIOPort;
- u8 reserved;
- u8 McaSlotNumber;
- u32 McaBaseMemoryAddress;
+typedef struct _i2o_mca_bus
+{
+ u16 McaBaseIOPort;
+ u8 reserved;
+ u8 McaSlotNumber;
+ u32 McaBaseMemoryAddress;
} i2o_mca_bus;
-typedef struct _i2o_other_bus {
+typedef struct _i2o_other_bus
+{
u16 BaseIOPort;
u16 reserved;
u32 BaseMemoryAddress;
} i2o_other_bus;
-typedef struct _i2o_hrt_entry {
- u32 adapter_id;
- u32 parent_tid:12;
- u32 state:4;
- u32 bus_num:8;
- u32 bus_type:8;
- union {
- i2o_pci_bus pci_bus;
- i2o_local_bus local_bus;
- i2o_isa_bus isa_bus;
- i2o_eisa_bus eisa_bus;
- i2o_mca_bus mca_bus;
- i2o_other_bus other_bus;
+typedef struct _i2o_hrt_entry
+{
+ u32 adapter_id;
+ u32 parent_tid:12;
+ u32 tate:4;
+ u32 bus_num:8;
+ u32 bus_type:8;
+ union
+ {
+ i2o_pci_bus pci_bus;
+ i2o_local_bus local_bus;
+ i2o_isa_bus isa_bus;
+ i2o_eisa_bus eisa_bus;
+ i2o_mca_bus mca_bus;
+ i2o_other_bus other_bus;
} bus;
} i2o_hrt_entry;
-typedef struct _i2o_hrt {
- u16 num_entries;
- u8 entry_len;
- u8 hrt_version;
- u32 change_ind;
+typedef struct _i2o_hrt
+{
+ u16 num_entries;
+ u8 entry_len;
+ u8 hrt_version;
+ u32 change_ind;
i2o_hrt_entry hrt_entry[1];
} i2o_hrt;
-typedef struct _i2o_lct_entry {
- u32 entry_size:16;
- u32 tid:12;
- u32 reserved:4;
- u32 change_ind;
- u32 device_flags;
- u32 class_id:12;
- u32 version:4;
- u32 vendor_id:16;
- u32 sub_class;
- u32 user_tid:12;
- u32 parent_tid:12;
- u32 bios_info:8;
- u8 identity_tag[8];
- u32 event_capabilities;
+typedef struct _i2o_lct_entry
+{
+ u32 entry_size:16;
+ u32 tid:12;
+ u32 reserved:4;
+ u32 change_ind;
+ u32 device_flags;
+ u32 class_id:12;
+ u32 version:4;
+ u32 vendor_id:16;
+ u32 sub_class;
+ u32 user_tid:12;
+ u32 parent_tid:12;
+ u32 bios_info:8;
+ u8 identity_tag[8];
+ u32 event_capabilities;
} i2o_lct_entry;
-typedef struct _i2o_lct {
- u32 table_size:16;
- u32 boot_tid:12;
- u32 lct_ver:4;
- u32 iop_flags;
- u32 change_ind;
+typedef struct _i2o_lct
+{
+ u32 table_size:16;
+ u32 boot_tid:12;
+ u32 lct_ver:4;
+ u32 iop_flags;
+ u32 change_ind;
i2o_lct_entry lct_entry[1];
} i2o_lct;
-typedef struct _i2o_status_block {
- u16 org_id;
- u16 reserved;
- u16 iop_id:12;
- u16 reserved1:4;
- u16 host_unit_id;
- u16 segment_number:12;
- u16 i2o_version:4;
- u8 iop_state;
- u8 msg_type;
- u16 inbound_frame_size;
- u8 init_code;
- u8 reserved2;
- u32 max_inbound_frames;
- u32 cur_inbound_frames;
- u32 max_outbound_frames;
- char product_id[24];
- u32 expected_lct_size;
- u32 iop_capabilities;
- u32 desired_mem_size;
- u32 current_mem_size;
- u32 current_mem_base;
- u32 desired_io_size;
- u32 current_io_size;
- u32 current_io_base;
- u32 reserved3:24;
- u32 cmd_status:8;
+typedef struct _i2o_status_block
+{
+ u16 org_id;
+ u16 reserved;
+ u16 iop_id:12;
+ u16 reserved1:4;
+ u16 host_unit_id;
+ u16 segment_number:12;
+ u16 i2o_version:4;
+ u8 iop_state;
+ u8 msg_type;
+ u16 inbound_frame_size;
+ u8 init_code;
+ u8 reserved2;
+ u32 max_inbound_frames;
+ u32 cur_inbound_frames;
+ u32 max_outbound_frames;
+ char product_id[24];
+ u32 expected_lct_size;
+ u32 iop_capabilities;
+ u32 desired_mem_size;
+ u32 current_mem_size;
+ u32 current_mem_base;
+ u32 desired_io_size;
+ u32 current_io_size;
+ u32 current_io_base;
+ u32 reserved3:24;
+ u32 cmd_status:8;
} i2o_status_block;
-
+
/* Event indicator mask flags */
#define I2O_EVT_IND_STATE_CHANGE 0x80000000
#define I2O_EVT_IND_GENERAL_WARNING 0x40000000
@@ -269,7 +281,7 @@ typedef struct _i2o_status_block {
#define I2O_EVT_IND_EXEC_ADAPTER_FAULT 0x00000004
#define I2O_EVT_IND_EXEC_POWER_FAIL 0x00000008
#define I2O_EVT_IND_EXEC_RESET_PENDING 0x00000010
-#define I2O_EVT_IND_EXEC_RESET_IMMINENT 0x00000020
+#define I2O_EVT_IND_EXEC_RESET_IMMINENT 0x00000020
#define I2O_EVT_IND_EXEC_HW_FAIL 0x00000040
#define I2O_EVT_IND_EXEC_XCT_CHANGE 0x00000080
#define I2O_EVT_IND_EXEC_NEW_LCT_ENTRY 0x00000100
@@ -280,14 +292,14 @@ typedef struct _i2o_status_block {
#define I2O_EVT_IND_BSA_VOLUME_LOAD 0x00000001
#define I2O_EVT_IND_BSA_VOLUME_UNLOAD 0x00000002
#define I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ 0x00000004
-#define I2O_EVT_IND_BSA_CAPACITY_CHANGE 0x00000008
+#define I2O_EVT_IND_BSA_CAPACITY_CHANGE 0x00000008
#define I2O_EVT_IND_BSA_SCSI_SMART 0x00000010
/* Event data for generic events */
#define I2O_EVT_STATE_CHANGE_NORMAL 0x00
#define I2O_EVT_STATE_CHANGE_SUSPENDED 0x01
#define I2O_EVT_STATE_CHANGE_RESTART 0x02
-#define I2O_EVT_STATE_CHANGE_NA_RECOVER 0x03
+#define I2O_EVT_STATE_CHANGE_NA_RECOVER 0x03
#define I2O_EVT_STATE_CHANGE_NA_NO_RECOVER 0x04
#define I2O_EVT_STATE_CHANGE_QUIESCE_REQUEST 0x05
#define I2O_EVT_STATE_CHANGE_FAILED 0x10
@@ -295,7 +307,7 @@ typedef struct _i2o_status_block {
#define I2O_EVT_GEN_WARNING_NORMAL 0x00
#define I2O_EVT_GEN_WARNING_ERROR_THRESHOLD 0x01
-#define I2O_EVT_GEN_WARNING_MEDIA_FAULT 0x02
+#define I2O_EVT_GEN_WARNING_MEDIA_FAULT 0x02
#define I2O_EVT_CAPABILITY_OTHER 0x01
#define I2O_EVT_CAPABILITY_CHANGED 0x02
@@ -309,89 +321,89 @@ typedef struct _i2o_status_block {
/* Class ID and Code Assignments
* (LCT.ClassID.Version field)
*/
-#define I2O_CLASS_VERSION_10 0x00
-#define I2O_CLASS_VERSION_11 0x01
+#define I2O_CLASS_VERSION_10 0x00
+#define I2O_CLASS_VERSION_11 0x01
/* Class code names
* (from v1.5 Table 6-1 Class Code Assignments.)
*/
-
-#define I2O_CLASS_EXECUTIVE 0x000
-#define I2O_CLASS_DDM 0x001
-#define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x010
-#define I2O_CLASS_SEQUENTIAL_STORAGE 0x011
-#define I2O_CLASS_LAN 0x020
-#define I2O_CLASS_WAN 0x030
-#define I2O_CLASS_FIBRE_CHANNEL_PORT 0x040
-#define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x041
-#define I2O_CLASS_SCSI_PERIPHERAL 0x051
-#define I2O_CLASS_ATE_PORT 0x060
-#define I2O_CLASS_ATE_PERIPHERAL 0x061
-#define I2O_CLASS_FLOPPY_CONTROLLER 0x070
-#define I2O_CLASS_FLOPPY_DEVICE 0x071
-#define I2O_CLASS_BUS_ADAPTER_PORT 0x080
-#define I2O_CLASS_PEER_TRANSPORT_AGENT 0x090
-#define I2O_CLASS_PEER_TRANSPORT 0x091
+
+#define I2O_CLASS_EXECUTIVE 0x000
+#define I2O_CLASS_DDM 0x001
+#define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x010
+#define I2O_CLASS_SEQUENTIAL_STORAGE 0x011
+#define I2O_CLASS_LAN 0x020
+#define I2O_CLASS_WAN 0x030
+#define I2O_CLASS_FIBRE_CHANNEL_PORT 0x040
+#define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x041
+#define I2O_CLASS_SCSI_PERIPHERAL 0x051
+#define I2O_CLASS_ATE_PORT 0x060
+#define I2O_CLASS_ATE_PERIPHERAL 0x061
+#define I2O_CLASS_FLOPPY_CONTROLLER 0x070
+#define I2O_CLASS_FLOPPY_DEVICE 0x071
+#define I2O_CLASS_BUS_ADAPTER_PORT 0x080
+#define I2O_CLASS_PEER_TRANSPORT_AGENT 0x090
+#define I2O_CLASS_PEER_TRANSPORT 0x091
/*
* Rest of 0x092 - 0x09f reserved for peer-to-peer classes
*/
-
-#define I2O_CLASS_MATCH_ANYCLASS 0xffffffff
+
+#define I2O_CLASS_MATCH_ANYCLASS 0xffffffff
/*
* Subclasses
*/
-#define I2O_SUBCLASS_i960 0x001
-#define I2O_SUBCLASS_HDM 0x020
-#define I2O_SUBCLASS_ISM 0x021
-
+#define I2O_SUBCLASS_i960 0x001
+#define I2O_SUBCLASS_HDM 0x020
+#define I2O_SUBCLASS_ISM 0x021
+
/* Operation functions */
-#define I2O_PARAMS_FIELD_GET 0x0001
-#define I2O_PARAMS_LIST_GET 0x0002
-#define I2O_PARAMS_MORE_GET 0x0003
-#define I2O_PARAMS_SIZE_GET 0x0004
-#define I2O_PARAMS_TABLE_GET 0x0005
-#define I2O_PARAMS_FIELD_SET 0x0006
-#define I2O_PARAMS_LIST_SET 0x0007
-#define I2O_PARAMS_ROW_ADD 0x0008
-#define I2O_PARAMS_ROW_DELETE 0x0009
-#define I2O_PARAMS_TABLE_CLEAR 0x000A
+#define I2O_PARAMS_FIELD_GET 0x0001
+#define I2O_PARAMS_LIST_GET 0x0002
+#define I2O_PARAMS_MORE_GET 0x0003
+#define I2O_PARAMS_SIZE_GET 0x0004
+#define I2O_PARAMS_TABLE_GET 0x0005
+#define I2O_PARAMS_FIELD_SET 0x0006
+#define I2O_PARAMS_LIST_SET 0x0007
+#define I2O_PARAMS_ROW_ADD 0x0008
+#define I2O_PARAMS_ROW_DELETE 0x0009
+#define I2O_PARAMS_TABLE_CLEAR 0x000A
/*
* I2O serial number conventions / formats
* (circa v1.5)
*/
-#define I2O_SNFORMAT_UNKNOWN 0
-#define I2O_SNFORMAT_BINARY 1
-#define I2O_SNFORMAT_ASCII 2
-#define I2O_SNFORMAT_UNICODE 3
-#define I2O_SNFORMAT_LAN48_MAC 4
-#define I2O_SNFORMAT_WAN 5
+#define I2O_SNFORMAT_UNKNOWN 0
+#define I2O_SNFORMAT_BINARY 1
+#define I2O_SNFORMAT_ASCII 2
+#define I2O_SNFORMAT_UNICODE 3
+#define I2O_SNFORMAT_LAN48_MAC 4
+#define I2O_SNFORMAT_WAN 5
/*
* Plus new in v2.0 (Yellowstone pdf doc)
*/
-#define I2O_SNFORMAT_LAN64_MAC 6
-#define I2O_SNFORMAT_DDM 7
-#define I2O_SNFORMAT_IEEE_REG64 8
-#define I2O_SNFORMAT_IEEE_REG128 9
-#define I2O_SNFORMAT_UNKNOWN2 0xff
+#define I2O_SNFORMAT_LAN64_MAC 6
+#define I2O_SNFORMAT_DDM 7
+#define I2O_SNFORMAT_IEEE_REG64 8
+#define I2O_SNFORMAT_IEEE_REG128 9
+#define I2O_SNFORMAT_UNKNOWN2 0xff
/*
* I2O Get Status State values
*/
-#define ADAPTER_STATE_INITIALIZING 0x01
-#define ADAPTER_STATE_RESET 0x02
-#define ADAPTER_STATE_HOLD 0x04
-#define ADAPTER_STATE_READY 0x05
-#define ADAPTER_STATE_OPERATIONAL 0x08
-#define ADAPTER_STATE_FAILED 0x10
-#define ADAPTER_STATE_FAULTED 0x11
-
+#define ADAPTER_STATE_INITIALIZING 0x01
+#define ADAPTER_STATE_RESET 0x02
+#define ADAPTER_STATE_HOLD 0x04
+#define ADAPTER_STATE_READY 0x05
+#define ADAPTER_STATE_OPERATIONAL 0x08
+#define ADAPTER_STATE_FAILED 0x10
+#define ADAPTER_STATE_FAULTED 0x11
+
#endif /* _I2O_DEV_H */
diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index 3ece9cee16bb..6fdec1eca6ca 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -17,24 +17,24 @@
#ifndef _I2O_H
#define _I2O_H
-#ifdef __KERNEL__ /* This file to be included by kernel only */
+
+#ifdef __KERNEL__ /* This file to be included by kernel only */
#include <linux/i2o-dev.h>
-/* How many different OSM's are we allowing */
+/* How many different OSM's are we allowing */
#define MAX_I2O_MODULES 64
/* How many OSMs can register themselves for device status updates? */
#define I2O_MAX_MANAGERS 4
-#include <asm/semaphore.h> /* Needed for MUTEX init macros */
+#include <asm/semaphore.h> /* Needed for MUTEX init macros */
#include <linux/config.h>
#include <linux/notifier.h>
-#include <linux/ioport.h>
#include <asm/atomic.h>
/*
- * message structures
+ * Message structures
*/
struct i2o_message
{
@@ -43,7 +43,7 @@ struct i2o_message
u16 size;
u32 target_tid:12;
u32 init_tid:12;
- u32 function:8;
+ u32 function:8;
u32 initiator_context;
/* List follows */
};
@@ -54,18 +54,19 @@ struct i2o_message
*/
struct i2o_device
{
- i2o_lct_entry lct_data; /* Device LCT information */
- u32 flags;
- int i2oversion; /* I2O version supported. Actually there
- * should be high and low version */
+ i2o_lct_entry lct_data; /* Device LCT information */
+ u32 flags;
+ int i2oversion; /* I2O version supported. Actually
+ * there should be high and low
+ * version */
- struct proc_dir_entry* proc_entry; /* /proc dir */
+ struct proc_dir_entry *proc_entry; /* /proc dir */
/* Primary user */
struct i2o_handler *owner;
/* Management users */
- struct i2o_handler *managers[I2O_MAX_MANAGERS];
+ struct i2o_handler *managers[I2O_MAX_MANAGERS];
int num_managers;
struct i2o_controller *controller; /* Controlling IOP */
@@ -76,24 +77,23 @@ struct i2o_device
/*
* Resource data for each PCI I2O controller
- */
+ */
struct i2o_pci
{
- struct pci_dev *pdev; /* PCI device */
- int irq;
- int queue_buggy:1; /* Don't send a lot of messages */
- int short_req:1; /* Use small block sizes */
- int dpt:1; /* Don't quiesce */
+ int irq;
+ int queue_buggy:1; /* Don't send a lot of messages */
+ int short_req:1; /* Use small block sizes */
+ int dpt:1; /* Don't quiesce */
#ifdef CONFIG_MTRR
- int mtrr_reg0;
- int mtrr_reg1;
+ int mtrr_reg0;
+ int mtrr_reg1;
#endif
};
/*
* Transport types supported by I2O stack
*/
-#define I2O_TYPE_PCI 0x01 /* PCI I2O controller */
+#define I2O_TYPE_PCI 0x01 /* PCI I2O controller */
/*
@@ -101,6 +101,8 @@ struct i2o_pci
*/
struct i2o_controller
{
+ struct pci_dev *pdev; /* PCI device */
+
char name[16];
int unit;
int type;
@@ -126,35 +128,35 @@ struct i2o_controller
u32 mem_offset; /* MFA offset */
u32 mem_phys; /* MFA physical */
-
+
int battery:1; /* Has a battery backup */
int io_alloc:1; /* An I/O resource was allocated */
int mem_alloc:1; /* A memory resource was allocated */
-
+
struct resource io_resource; /* I/O resource allocated to the IOP */
struct resource mem_resource; /* Mem resource allocated to the IOP */
- struct proc_dir_entry* proc_entry; /* /proc dir */
+ struct proc_dir_entry *proc_entry; /* /proc dir */
- union
- { /* Bus information */
+ union { /* Bus information */
struct i2o_pci pci;
} bus;
/* Bus specific destructor */
- void (*destructor)(struct i2o_controller *);
+ void (*destructor)(struct i2o_controller *);
/* Bus specific attach/detach */
- int (*bind)(struct i2o_controller *, struct i2o_device *);
+ int (*bind)(struct i2o_controller *, struct i2o_device *);
/* Bus specific initiator */
int (*unbind)(struct i2o_controller *, struct i2o_device *);
/* Bus specific enable/disable */
- void (*bus_enable)(struct i2o_controller *c);
- void (*bus_disable)(struct i2o_controller *c);
+ void (*bus_enable)(struct i2o_controller *);
+ void (*bus_disable)(struct i2o_controller *);
- void *page_frame; /* Message buffers */
+ void *page_frame; /* Message buffers */
+ dma_addr_t page_frame_map; /* Cache map */
};
/*
@@ -169,7 +171,8 @@ struct i2o_controller
struct i2o_handler
{
/* Message reply handler */
- void (*reply)(struct i2o_handler *, struct i2o_controller *, struct i2o_message *);
+ void (*reply)(struct i2o_handler *, struct i2o_controller *,
+ struct i2o_message *);
/* New device notification handler */
void (*new_dev_notify)(struct i2o_controller *, struct i2o_device *);
@@ -181,7 +184,7 @@ struct i2o_handler
void (*reboot_notify)(void);
char *name; /* OSM name */
- int context; /* Low 8 bits of the transaction info */
+ int context; /* Low 8 bits of the transaction info */
u32 class; /* I2O classes that this driver handles */
/* User data follows */
};
@@ -201,12 +204,12 @@ struct i2o_core_func_table
{
int (*install)(struct i2o_controller *);
int (*activate)(struct i2o_controller *);
- struct i2o_controller* (*find)(int);
+ struct i2o_controller *(*find)(int);
void (*unlock)(struct i2o_controller *);
- void (*run_queue)(struct i2o_controller *c);
+ void (*run_queue)(struct i2o_controller * c);
int (*delete)(struct i2o_controller *);
};
-#endif // MODULE
+#endif /* MODULE */
/*
* I2O System table entry
@@ -222,9 +225,9 @@ struct i2o_sys_tbl_entry
u32 iop_id:12;
u32 reserved2:20;
u16 seg_num:12;
- u16 i2o_version:4;
- u8 iop_state;
- u8 msg_type;
+ u16 i2o_version:4;
+ u8 iop_state;
+ u8 msg_type;
u16 frame_size;
u16 reserved3;
u32 last_changed;
@@ -235,14 +238,14 @@ struct i2o_sys_tbl_entry
struct i2o_sys_tbl
{
- u8 num_entries;
- u8 version;
- u16 reserved1;
+ u8 num_entries;
+ u8 version;
+ u16 reserved1;
u32 change_ind;
u32 reserved2;
u32 reserved3;
struct i2o_sys_tbl_entry iops[0];
-};
+};
/*
* Messenger inlines
@@ -265,9 +268,9 @@ static inline u32 I2O_REPLY_READ32(struct i2o_controller *c)
static inline void I2O_REPLY_WRITE32(struct i2o_controller *c, u32 Val)
{
- *c->reply_port= Val;
+ *c->reply_port = Val;
}
-
+
static inline u32 I2O_IRQ_READ32(struct i2o_controller *c)
{
@@ -283,13 +286,13 @@ static inline void I2O_IRQ_WRITE32(struct i2o_controller *c, u32 Val)
static inline void i2o_post_message(struct i2o_controller *c, u32 m)
{
/* The second line isnt spurious - thats forcing PCI posting */
- I2O_POST_WRITE32(c,m);
+ I2O_POST_WRITE32(c, m);
(void) I2O_IRQ_READ32(c);
}
static inline void i2o_flush_reply(struct i2o_controller *c, u32 m)
{
- I2O_REPLY_WRITE32(c,m);
+ I2O_REPLY_WRITE32(c, m);
}
extern struct i2o_controller *i2o_find_controller(int);
@@ -304,23 +307,27 @@ extern int i2o_remove_handler(struct i2o_handler *);
extern int i2o_claim_device(struct i2o_device *, struct i2o_handler *);
extern int i2o_release_device(struct i2o_device *, struct i2o_handler *);
extern int i2o_device_notify_on(struct i2o_device *, struct i2o_handler *);
-extern int i2o_device_notify_off(struct i2o_device *, struct i2o_handler *);
+extern int i2o_device_notify_off(struct i2o_device *,
+ struct i2o_handler *);
extern int i2o_post_this(struct i2o_controller *, u32 *, int);
extern int i2o_post_wait(struct i2o_controller *, u32 *, int, int);
-extern int i2o_post_wait_mem(struct i2o_controller *, u32 *, int, int, void *, void *);
-
-extern int i2o_query_scalar(struct i2o_controller *, int, int, int, void *, int);
-extern int i2o_set_scalar(struct i2o_controller *, int, int, int, void *, int);
-extern int i2o_query_table(int, struct i2o_controller *, int, int, int, void *,
- int, void *, int);
-extern int i2o_clear_table(struct i2o_controller *, int, int);
-extern int i2o_row_add_table(struct i2o_controller *, int, int, int, void *,
- int);
-extern int i2o_issue_params(int, struct i2o_controller *, int, void *,
- int, void *, int);
-
-extern int i2o_event_register(struct i2o_controller *, u32, u32, u32, u32);
+extern int i2o_post_wait_mem(struct i2o_controller *, u32 *, int, int,
+ void *, void *);
+
+extern int i2o_query_scalar(struct i2o_controller *, int, int, int, void *,
+ int);
+extern int i2o_set_scalar(struct i2o_controller *, int, int, int, void *,
+ int);
+extern int i2o_query_table(int, struct i2o_controller *, int, int, int,
+ void *, int, void *, int);
+extern int i2o_clear_table(struct i2o_controller *, int, int);
+extern int i2o_row_add_table(struct i2o_controller *, int, int, int,
+ void *, int);
+extern int i2o_issue_params(int, struct i2o_controller *, int, void *, int,
+ void *, int);
+
+extern int i2o_event_register(struct i2o_controller *, u32, u32, u32, u32);
extern int i2o_event_ack(struct i2o_controller *, u32 *);
extern void i2o_report_status(const char *, const char *, u32 *);
@@ -339,7 +346,7 @@ extern int i2o_delete_controller(struct i2o_controller *);
/*
* Executive Class
- */
+ */
#define I2O_CMD_ADAPTER_ASSIGN 0xB3
#define I2O_CMD_ADAPTER_READ 0xB2
#define I2O_CMD_ADAPTER_RELEASE 0xB5
@@ -524,7 +531,7 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define I2O_CLAIM_MANAGEMENT 0x02000000
#define I2O_CLAIM_AUTHORIZED 0x03000000
#define I2O_CLAIM_SECONDARY 0x04000000
-
+
/* Message header defines for VersionOffset */
#define I2OVER15 0x0001
#define I2OVER20 0x0002
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index bc3d02f4d249..f39bcabdf7c0 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1594,6 +1594,16 @@
#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b
#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c
#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e
+#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480
+#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482
+#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483
+#define PCI_DEVICE_ID_INTEL_82801CA_4 0x2484
+#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485
+#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486
+#define PCI_DEVICE_ID_INTEL_82801CA_7 0x2487
+#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a
+#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b
+#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c
#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120
#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121
#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h
index 29a0c691883c..48aab6f712a3 100644
--- a/include/linux/sonypi.h
+++ b/include/linux/sonypi.h
@@ -67,9 +67,12 @@
#define SONYPI_EVENT_FNKEY_S 29
#define SONYPI_EVENT_FNKEY_B 30
#define SONYPI_EVENT_BLUETOOTH_PRESSED 31
-#define SONYPI_EVENT_PKEY_P1 32
-#define SONYPI_EVENT_PKEY_P2 33
-#define SONYPI_EVENT_PKEY_P3 34
+#define SONYPI_EVENT_PKEY_P1 32
+#define SONYPI_EVENT_PKEY_P2 33
+#define SONYPI_EVENT_PKEY_P3 34
+#define SONYPI_EVENT_BACK_PRESSED 35
+#define SONYPI_EVENT_LID_CLOSED 36
+#define SONYPI_EVENT_LID_OPENED 37
/* brightness etc. ioctls */
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 059329c7759e..440ba7df43ec 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -30,6 +30,10 @@
#define write_unlock_irqrestore(lock, flags) do { write_unlock(lock); local_irq_restore(flags); } while (0)
#define write_unlock_irq(lock) do { write_unlock(lock); local_irq_enable(); } while (0)
#define write_unlock_bh(lock) do { write_unlock(lock); local_bh_enable(); } while (0)
+#define spin_trylock_bh(lock) ({ int __r; local_bh_disable();\
+ __r = spin_trylock(lock); \
+ if (!__r) local_bh_enable(); \
+ __r; })
#ifdef CONFIG_SMP
#include <asm/spinlock.h>
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
index 736d617f0a68..c2a0b4b23948 100644
--- a/include/linux/udf_fs.h
+++ b/include/linux/udf_fs.h
@@ -37,8 +37,8 @@
#define UDF_PREALLOCATE
#define UDF_DEFAULT_PREALLOC_BLOCKS 8
-#define UDFFS_DATE "2001/06/13"
-#define UDFFS_VERSION "0.9.4.1"
+#define UDFFS_DATE "2001/10/10"
+#define UDFFS_VERSION "0.9.5"
#if !defined(UDFFS_RW)
diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h
index c07d6678708d..fdb078d9dbc6 100644
--- a/include/linux/udf_fs_sb.h
+++ b/include/linux/udf_fs_sb.h
@@ -18,10 +18,6 @@
#if !defined(_LINUX_UDF_FS_SB_H)
#define _LINUX_UDF_FS_SB_H
-#ifndef LINUX_VERSION_CODE
-#include <linux/version.h>
-#endif
-
#pragma pack(1)
#define UDF_MAX_BLOCK_LOADED 8
@@ -89,7 +85,7 @@ struct udf_sb_info
__u16 s_partition;
/* Sector headers */
- __u32 s_session;
+ __s32 s_session;
__u32 s_anchor[4];
__u32 s_lastblock;
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 007639810d75..9ae491f509d5 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -185,7 +185,7 @@ struct video_capture
{
__u32 x,y; /* Offsets into image */
__u32 width, height; /* Area to capture */
- __u16 decimation; /* Decimation divder */
+ __u16 decimation; /* Decimation divider */
__u16 flags; /* Flags for capture */
#define VIDEO_CAPTURE_ODD 0 /* Temporal */
#define VIDEO_CAPTURE_EVEN 1
@@ -378,14 +378,4 @@ struct video_code
#define VID_HARDWARE_MEYE 32 /* Sony Vaio MotionEye cameras */
#define VID_HARDWARE_CPIA2 33
-/*
- * Initialiser list
- */
-
-struct video_init
-{
- char *name;
- int (*init)(struct video_init *);
-};
-
#endif